]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: sysfs_sd_setattr set iattrs unconditionally
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 4 Feb 2010 07:13:24 +0000 (23:13 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Feb 2010 23:42:42 +0000 (15:42 -0800)
commit2d3c71f9c52fb82da4a448a753558a8b1067b77f
treed35c745ca95a72a0d6af1c51b06ca6f3eb93a254
parent6fba9e49cc1a2deadd56565791199bcd58cda8ff
sysfs: sysfs_sd_setattr set iattrs unconditionally

There is currently a bug in sysfs_sd_setattr inherited from
sysfs_setattr in 2.6.32 where the first time we set the attributes
on a sysfs file we allocate backing store but do not set the
backing store attributes.  Resulting in overly restrictive
permissions on sysfs files.

The fix is to simply modify the code so that it always executes
when we update the sysfs attributes, as we did in 2.6.31 and earlier.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Tested-by: Jean Delvare <khali@linux-fr.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/inode.c