From: Greg KH <gregkh@suse.de>
To: NeilBrown <neilb@suse.de>
Cc: Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.31rc5 RAID10 lockdep report - sysfs_nofity_dirent locking issue
Date: Tue, 4 Aug 2009 14:24:04 -0700 [thread overview]
Message-ID: <20090804212404.GA26390@suse.de> (raw)
In-Reply-To: <58e2e493d0855face4e7d3fbf7ee65b9.squirrel@neil.brown.name>
On Wed, Aug 05, 2009 at 07:13:08AM +1000, NeilBrown wrote:
> On Wed, August 5, 2009 12:14 am, Dave Jones wrote:
> > Report from a user we received today ..
> > (https://bugzilla.redhat.com/show_bug.cgi?id=515471)
> >
> > Dave
> >
> >
> > =================================
> > [ INFO: inconsistent lock state ]
> > 2.6.31-0.118.rc5.fc12.x86_64 #1
> > ---------------------------------
> > inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
> > md126_resync/475 [HC0[0]:SC1[1]:HE1:SE0] takes:
> > (sysfs_open_dirent_lock){+.?...}, at: [<ffffffff811a7d08>]
> > sysfs_notify_dirent+0x2c/0x75
>
> So the problem is that sysfs_open_dirent_lock is sometimes called
> with SOFTIRQs enabled, and sometimes called in a SOFTIRQ and this
> can lead to a deadlock.
>
> The call from in a softirq is in sysfs_notify_dirent which is a very
> small atomic function which I would certainly like to be able to
> call from any context.
>
> So the fix would be to use spin_lock_irq on the sysfs_open_dirent_lock ??
> Or should it be spin_lock_bh ??
>
> Attached is a suggestion for a patch.
>
> Greg: does that look right? If so I'll add a changelog entry and
> submit it properly (after at least a compile test...)
Yes, it looks correct, if it passes your tests :)
thanks,
greg k-h
next prev parent reply other threads:[~2009-08-04 21:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 14:14 2.6.31rc5 RAID10 lockdep report Dave Jones
2009-08-04 21:13 ` 2.6.31rc5 RAID10 lockdep report - sysfs_nofity_dirent locking issue NeilBrown
2009-08-04 21:24 ` Greg KH [this message]
2009-08-06 5:43 ` Neil Brown
2009-09-15 22:12 ` Dan Williams
2009-09-15 22:25 ` Greg KH
2009-09-15 23:05 ` Dan Williams
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=20090804212404.GA26390@suse.de \
--to=gregkh@suse.de \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/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