> > sysfs_chmod_file() calls notify_change() to change the permission bits
Right, but that's not sysfs_chmod_file() but sys_chmod(), which calls
notify_change(), which calls security_inode_setattr().
sysfs_chmod_file() is just called by a couple of drivers to change the
file mode during operation, it's never called by user action directly.
Miklos
--