From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH 5/5] xfs: Correctly lock inode when removing suid and security marks Date: Wed, 4 Mar 2015 08:34:50 +1100 Message-ID: <20150303213450.GT4251@dastard> References: <1425379119-3773-1-git-send-email-jack@suse.cz> <1425379119-3773-6-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com To: Jan Kara Return-path: Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:61868 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755320AbbCCVfa (ORCPT ); Tue, 3 Mar 2015 16:35:30 -0500 Content-Disposition: inline In-Reply-To: <1425379119-3773-6-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 Looks good. Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com