From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932867Ab1KGRTe (ORCPT ); Mon, 7 Nov 2011 12:19:34 -0500 Received: from merlin.infradead.org ([205.233.59.134]:32951 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755836Ab1KGRTc convert rfc822-to-8bit (ORCPT ); Mon, 7 Nov 2011 12:19:32 -0500 Subject: Re: [BUG] kernel 3.1.0 possible circular locking dependency detected From: Peter Zijlstra To: Linus Torvalds Cc: Knut Petersen , linux-kernel@vger.kernel.org, reiserfs-devel@vger.kernel.org, Greg KH , Al Viro , Christoph Hellwig , Frederic Weisbecker , Jeff Mahoney Date: Mon, 07 Nov 2011 18:18:27 +0100 In-Reply-To: References: <4EAE5DE3.2020205@t-online.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.0.3- Message-ID: <1320686307.17809.33.camel@twins> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2011-10-31 at 08:08 -0700, Linus Torvalds wrote: > [ Added a few more people to the cc ] > > On Mon, Oct 31, 2011 at 1:35 AM, Knut Petersen > wrote: > > After a " rm -r /verybigdir" (about 12G on a 25G reiserfs 3.6partition) > > I found the following report about a circular locking dependency in > > kernel 3.1.0 > > Heh. There is even a comment about the ordering violation: > > /* We use I_MUTEX_CHILD here to silence lockdep. It's safe because xattr > * mutation ops aren't called during rename or splace, which are the > * only other users of I_MUTEX_CHILD. It violates the ordering, but that's > * better than allocating another subclass just for this code. */ > > and apparently the comment is wrong: we *do* end up looking up xattrs > during splice, due to the security_inode_need_killpriv() thing. > > So I think this needs a suid (or sgid) file that has xattrs and is removed. > > That said, I suspect this is a false positive, because the actual > unlink can never happen while somebody is splicing to/from the same > file at the same time (because then the iput wouldn't be the last one > for the inode, and the file removal would be delayed until the file > has been closed for the last time). > > But the hacky use of "I_MUTEX_CHILD" is basically not the proper way > to silence the lockdep splat. > > Anybody? I_MUTEX_XATTR sounds like the right nesting for something called xattr_*() but then, what do I know about filesystems.. Jeff Mahoney wrote this, Jeff any clue?