All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: npiggin@kernel.dk, linux-fsdevel@vger.kernel.org
Subject: Re: [2.6.38] Deadlock between rename_lock and vfsmount_lock.
Date: Fri, 18 Mar 2011 11:06:03 +0000	[thread overview]
Message-ID: <20110318110603.GG22723@ZenIV.linux.org.uk> (raw)
In-Reply-To: <201103181959.CHC73937.SQOLJtVHOMFFOF@I-love.SAKURA.ne.jp>

On Fri, Mar 18, 2011 at 07:59:08PM +0900, Tetsuo Handa wrote:
> I established steps to reproduce.
> 
> On a 2.6.38 kernel built with CONFIG_SMP=y running on an SMP machine, run
> 
>   while :; do newns /sbin/pivot_root /proc/ /proc/sys/; done
> 
> on one terminal and run
> 
>   while :; do /bin/ls -l /proc/*/exe; done
> 
> on another terminal. (The "newns" is a program that unshares the mnt namespace
> before execve() using CLONE_NEWNS.)
> 
> Below patch releases/reacquires vfsmount_lock when rescheduling is required.
> ---
>  fs/dcache.c             |   15 ++++++++++++++-
>  fs/namespace.c          |    6 ++++++
>  include/linux/sched.h   |    2 ++
>  include/linux/seqlock.h |    4 ++++
>  4 files changed, 26 insertions(+), 1 deletion(-)

That's incredibly ugly.  I agree that the deadlock exists and needs to be
dealt with, but not that way.  _Strongly_ NAKed.  I'll see what I can come
up with, but that variant is not an option.

  reply	other threads:[~2011-03-18 11:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16  8:54 [2.6.38] Possible deadlock at pivot_root? Tetsuo Handa
2011-03-17  5:01 ` [2.6.38] Deadlock between rename_lock and vfsmount_lock Tetsuo Handa
2011-03-18 10:59   ` Tetsuo Handa
2011-03-18 11:06     ` Al Viro [this message]
2011-03-18 11:54       ` Tetsuo Handa
2011-03-18 12:07       ` Al Viro
2011-03-18 12:13         ` Al Viro
2011-03-18 12:52         ` Al Viro
2011-03-18 13:18           ` Al Viro
2011-03-19  2:39             ` Tetsuo Handa
2011-03-23 23:00               ` Greg KH
2011-03-24  0:04                 ` Tetsuo Handa
2011-03-24  0:10                   ` Greg KH

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=20110318110603.GG22723@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=npiggin@kernel.dk \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /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.