Re: [PATCH] sysfs: Fix internal_create_group() for named group updates

2018-06-16 Thread Rajat Jain
Hi Greg, Thanks for your review. On Sat, Jun 16, 2018 at 12:11 AM, Greg Kroah-Hartman wrote: > On Fri, Jun 15, 2018 at 06:29:10PM -0700, Rajat Jain wrote: >> There are a couple of problems with named group updates in the code >> today: >> >> * sysfs_update_group() will always fail for a named gr

Re: [PATCH] sysfs: Fix internal_create_group() for named group updates

2018-06-16 Thread Greg Kroah-Hartman
On Fri, Jun 15, 2018 at 06:29:10PM -0700, Rajat Jain wrote: > There are a couple of problems with named group updates in the code > today: > > * sysfs_update_group() will always fail for a named group, because > internal_create_group() will try to create a new sysfs directory > unconditionally

[PATCH] sysfs: Fix internal_create_group() for named group updates

2018-06-15 Thread Rajat Jain
There are a couple of problems with named group updates in the code today: * sysfs_update_group() will always fail for a named group, because internal_create_group() will try to create a new sysfs directory unconditionally, which will ofcourse fail with -EEXIST. * We can leak the kernfs_node