xfs
[Top] [All Lists]

Re: [PATCH 5/5] xfs: Correctly lock inode when removing suid and securit

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH 5/5] xfs: Correctly lock inode when removing suid and security marks
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 15 Apr 2015 09:03:31 +1000
Cc: Jan Kara <jack@xxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <552D465F.4010700@xxxxxxxxxxx>
References: <1425379119-3773-1-git-send-email-jack@xxxxxxx> <1425379119-3773-6-git-send-email-jack@xxxxxxx> <552D465F.4010700@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Apr 14, 2015 at 11:54:55AM -0500, Eric Sandeen wrote:
> On 3/3/15 4:38 AM, 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@xxxxxxx>
> 
> This seems like it stands alone, modulo the file_remove_privs function
> renaming... should it just be pulled into XFS by Dave?  I guess that would
> require the renaming patch to be rebased...

The file_remove_privs() is introduced earlier in the series. With
all the changes pending to xfs_file_aio_write_checks() from the
upcoming VFS merge, the DIo write fixes I'll be pushing, this, and
other problems Al Viro has noticed, I'm probably going to have to
refactor this code for 4.1-rc2 to fix all the bugs we've introduced
during integration of all the changes...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>