linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: ?????? shin hong <hongshin@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: BUG? deadlock bug at generic_shutdown_
Date: Wed, 29 Jul 2009 21:41:24 -0600	[thread overview]
Message-ID: <20090730034124.GO3711@parisc-linux.org> (raw)
In-Reply-To: <2014bcab0907292029o6617b6a7n944cbd28edd39c10@mail.gmail.com>

On Thu, Jul 30, 2009 at 12:29:57PM +0900, ?????? shin hong wrote:
> Hi. I am reporting a suspected deadlock bug.
> 
> generic_shutdown_super() acquires lock_super(sb)
> and then acquires lock_kernel().

It hasn't since commit a9e220f8322e2b0e0b8903fe00265461cffad3f0.
Please work against a current kernel.

> However, do_remount() acquires lock_super() while
> it holds lock_kernel().
> 
> Therefore, concurrent execution of generic_shutdown_super()
> and do_remount() may result deadlock.

The reason this wasn't a problem before the commit above is that
generic_shutdown_super() can never execute concurrently with do_remount.
For generic_shutdown_super() to be called, there must be no remaining
references to the super_block.  do_remount() must hold a reference to
the super_block.

CONFIG_LOCKDEP finds lock inversion problems; I suspect you're wasting
your time looking for them by hand.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

      reply	other threads:[~2009-07-30  3:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30  3:29 BUG? deadlock bug at generic_shutdown_ 홍신 shin hong
2009-07-30  3:41 ` Matthew Wilcox [this message]

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=20090730034124.GO3711@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=hongshin@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).