All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Knut Petersen <Knut_Petersen@t-online.de>,
	linux-kernel@vger.kernel.org, reiserfs-devel@vger.kernel.org,
	Greg KH <gregkh@suse.de>, Al Viro <viro@zeniv.linux.org.uk>,
	Christoph Hellwig <hch@lst.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jeff Mahoney <jeffm@suse.com>
Subject: Re: [BUG] kernel 3.1.0 possible circular locking dependency detected
Date: Mon, 07 Nov 2011 18:18:27 +0100	[thread overview]
Message-ID: <1320686307.17809.33.camel@twins> (raw)
In-Reply-To: <CA+55aFzuWD1xRhQNLfe0ey_-1vACwY=ofD5PXSzL_5UeDRbk8g@mail.gmail.com>

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
> <Knut_Petersen@t-online.de> 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?

  parent reply	other threads:[~2011-11-07 17:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31  8:35 [BUG] kernel 3.1.0 possible circular locking dependency detected Knut Petersen
2011-10-31 15:08 ` Linus Torvalds
2011-10-31 15:59   ` Knut Petersen
2011-11-07 17:18   ` Peter Zijlstra [this message]
2011-11-15 13:59   ` kernel 3.1.1 / 3.1.0 reiserfs locking problems Knut Petersen
2011-11-15 13:59     ` Knut Petersen
2011-11-15 18:15     ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320686307.17809.33.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=Knut_Petersen@t-online.de \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@suse.de \
    --cc=hch@lst.de \
    --cc=jeffm@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.