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

2018-06-16 Thread Greg Kroah-Hartman
On Sat, Jun 16, 2018 at 01:18:37AM -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 v2] sysfs: Fix internal_create_group() for named group updates

2018-06-16 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