From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mimi Zohar Subject: Re: [PULL REQUEST] : ima-appraisal patches Date: Thu, 19 Apr 2012 15:57:28 -0400 Message-ID: <1334865448.2429.35.camel@falcor> References: <1334754302.2137.8.camel@falcor> <1334772473.2137.22.camel@falcor> <20120418183938.GH6589@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: James Morris , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, David Safford , Dmitry Kasatkin To: Al Viro Return-path: In-Reply-To: <20120418183938.GH6589@ZenIV.linux.org.uk> Sender: linux-security-module-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, 2012-04-18 at 19:39 +0100, Al Viro wrote: > On Wed, Apr 18, 2012 at 02:07:52PM -0400, Mimi Zohar wrote: > NAKed at least until you come up with formal proof that there's no other > lock where fput() would be possible and ->i_mutex was not allowed. Has the discussion here moved from deferring the __fput() for the mmap_sem/i_mutex lockdep side case, to taking the i_mutex in __fput() in general? Lockdep has not reported any problems, other than for the mmap_sem/i_mutex scenario. > This > is not a way to go; that kind of kludges leads to locking code that is > impossible to reason about. Are you referring to defering the __fput() or taking the i_mutex in __fput() in general? The i_mutex is currently used to protect file data and metadata (eg. chown, chmod, xattrs). After the last file data change, the file metadata needs to be updated to reflect the file data changes. As i_mutex is used for protecting both the file data and file metadata, why would taking the i_mutex in __fput() be kludgie. I'd really appreciate any help, suggestions. thanks, Mimi