OpenVZ Forum

Home » Mailing lists » Devel » [PATCH 04/15] sysfs: Implement __sysfs_get_dentry
Re: [PATCH 06/15] Introduce sysfs_sd_setattr and fix sysfs_chmod [message #31609 is a reply to message #31593] Fri, 04 July 2008 06:40 Go to previous message
Tejun Heo is currently offline  Tejun Heo
Messages: 184
Registered: November 2006
Senior Member
Eric W. Biederman wrote:
> Currently sysfs_chmod calls sys_setattr which in turn calls
> inode_change_ok which checks to see if it is ok for the current user
> space process to change tha attributes. Since sysfs_chmod_file has
> only kernel mode clients denying them permission if user space is the
> problem is completely inappropriate.
> Therefore factor out sysfs_sd_setattr which does not call
> inode_change_ok and modify sysfs_chmod_file to call it.
> In addition setting victim_sd->s_mode explicitly in sysfs_chmod_file
> is redundant so remove that as well.
> Thanks to Tejun Heo <>, and
> Daniel Lezcano <> for working on this
> and spotting this case.
> Signed-off-by: Eric W. Biederman <>

Acked-by: Tejun Heo <>

Containers mailing list
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH 0/2] dm-ioband: I/O bandwidth controller v1.2.0: Introduction
Next Topic: [PATCH 07/15] sysfs: sysfs_chmod_file handle multiple superblocks
Goto Forum:

Current Time: Thu Sep 28 05:08:39 GMT 2023

Total time taken to generate the page: 0.03036 seconds