[PATCH 5/5] xfs: Correctly lock inode when removing suid and security marks

Dave Chinner david at fromorbit.com
Tue Mar 3 15:34:50 CST 2015


On Tue, Mar 03, 2015 at 11:38:39AM +0100, Jan Kara wrote:
> Currently XFS calls file_remove_privs() without holding i_mutex. This is
> wrong because that function can end up messing with file permissions and
> security xattrs for which we need i_mutex held.
> 
> Fix the problem by grabbing iolock exclusively when we will need to
> change anything in permissions / xattrs.
> 
> Signed-off-by: Jan Kara <jack at suse.cz>

Looks good.

Reviewed-by: Dave Chinner <dchinner at redhat.com>

-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list