From: Neil Brown <neilb@suse.de>
To: "Dailey, Nate" <Nate.Dailey@stratus.com>
Cc: linux-raid@vger.kernel.org, mingo@redhat.com
Subject: RE: crash: write_sb_page walks mddev.disks without holding reconfig_mutex
Date: Tue, 22 Jul 2008 08:56:12 +1000 [thread overview]
Message-ID: <18565.5132.347195.910949@notabene.brown> (raw)
In-Reply-To: message from Dailey, Nate on Monday July 21
On Monday July 21, Nate.Dailey@stratus.com wrote:
> Quick update... I've applied your patch to the kernel I'm using. There
> were a few differences... for example, md_delayed_delete doesn't exist
> in my kernel (so I added it).
>
> Unfortunately, I'm hitting a deadlock, and it looks like md_delayed_work
> is at fault. Seems that in at least one case, code which holds the
> inode_lock is interrupted, at which point the md_delayed_delete code
> gets to run. He ends up needing the inode_lock too, and we're stuck.
Yes.... I noticed yesterday that there was a problem with that patch.
calling md_delayed_delete with call_rcu just isn't right.
md_delayed_delete needs to get a mutex, and call_rcu calls things in a
context where mutexes aren't allowed. The problem you are seeing has
exactly the same cause.
So I've changed it to:
call synchronise_rcu() to handle the RCU side, and
restore the use of schedule_work to run md_delayed delete.
so unbind_rdev_from_array now ends.
synchronize_rcu();
INIT_WORK(&rdev->del_work, md_delayed_delete);
kobject_get(&rdev->kobj);
schedule_work(&rdev->del_work);
You can see the submitted version of the full patch at
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4b80991c6cb9efa607bc4fd6f3ecdf5511c31bb0
If you can test that (with appropriate revisions to apply to your
kernel) I'd really appreciate it.
Thanks,
NeilBrown
next prev parent reply other threads:[~2008-07-21 22:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 19:59 crash: write_sb_page walks mddev.disks without holding reconfig_mutex Dailey, Nate
2008-07-21 22:56 ` Neil Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-07-24 12:42 Dailey, Nate
2008-07-15 19:48 Dailey, Nate
2008-07-14 18:30 Dailey, Nate
2008-07-15 0:36 ` Neil Brown
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=18565.5132.347195.910949@notabene.brown \
--to=neilb@suse.de \
--cc=Nate.Dailey@stratus.com \
--cc=linux-raid@vger.kernel.org \
--cc=mingo@redhat.com \
/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