From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Cornelia Huck" <cornelia.huck@de.ibm.com>
Cc: "Adrian Bunk" <bunk@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Ingo Molnar" <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
"Jens Axboe" <jens.axboe@oracle.com>,
"Greg Kroah-Hartman" <gregkh@suse.de>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
"Kay Sievers" <kay.sievers@vrfy.org>,
"Neil Brown" <neilb@suse.de>,
"Mariusz Kozlowski" <m.kozlowski@tuxland.pl>,
"Dave Young" <hidave.darkstar@gmail.com>
Subject: Re: [bug, 2.6.26-rc4/rc5] sporadic bootup crashes in blk_lookup_devt()/prepare_namespace()
Date: Mon, 9 Jun 2008 17:09:29 +0200 [thread overview]
Message-ID: <19f34abd0806090809h6d864fbahc10d41c0aacbfa08@mail.gmail.com> (raw)
In-Reply-To: <20080609165757.184724ff@gondolin.boeblingen.de.ibm.com>
On 6/9/08, Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> On Mon, 9 Jun 2008 16:28:09 +0200,
>
> "Vegard Nossum" <vegard.nossum@gmail.com> wrote:
> > Everywhere else where we traverse the struct class->devices list, they
> > have down(&class->sem); first and up(&class->sem); afterwards.
> >
> > Commit fd04897bb20be29d60f7e426a053545aebeaa61a even has this hunk:
> > @@ -177,8 +177,7 @@ struct class {
> > struct list_head devices;
> > struct list_head interfaces;
> > struct kset class_dirs;
> > - struct semaphore sem; /* locks both the children and interface
> > -
> > + struct semaphore sem; /* locks children, devices, interfaces */
> > struct class_attribute * class_attrs;
> > struct class_device_attribute * class_dev_attrs;
> > struct device_attribute * dev_attrs;
> >
> >
> > So why doesn't block/genhd.c do this too? It seems to me that the
> > mutex locking here is simply a remnant of old code that happened to
> > not crash in most cases by chance.
> >
>
>
> Does this crash happen with the conversion to the class iterator
> functions (should be in linux-next) as well? They take the class
> mutex...
Ah, you mean this:
commit bb7ee70edb8745021c17ab604f2f4c897004e1c5
Author: Greg Kroah-Hartman <gregkh@suse.de>
Date: Thu May 22 17:21:08 2008 -0400
block: make blk_lookup_devt use the class iterator function
Use the proper class iterator function instead of mucking around in the
internals of the class structures.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
So it should already be fixed, then. But I guess we'll have to wait
for Ingo to run another couple of thousand tests to know the answer
;-)
Thanks!
Hm. Bugs already fixed elsewhere seems to be a recurring theme... I'll
look harder for changes/fixes in other trees the next time :-(
Vegard
PS: But what about printk_all_partitions()? There are more than just
this instance of the device list traversal code that don't use the
class semaphore.
PPS: Was that patch ever posted to LKML? I couldn't seem to find it.
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
next prev parent reply other threads:[~2008-06-09 15:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-09 8:03 Ingo Molnar
2008-06-09 9:06 ` Andrew Morton
2008-06-09 9:09 ` Vegard Nossum
2008-06-09 9:34 ` Ingo Molnar
2008-06-09 10:35 ` Vegard Nossum
2008-06-09 13:34 ` Adrian Bunk
2008-06-09 13:58 ` Vegard Nossum
2008-06-09 14:28 ` Vegard Nossum
2008-06-09 14:57 ` Cornelia Huck
2008-06-09 15:09 ` Vegard Nossum [this message]
2008-06-09 15:29 ` Linus Torvalds
2008-06-09 15:38 ` Ingo Molnar
2008-06-09 16:15 ` Linus Torvalds
2008-06-09 17:15 ` Cornelia Huck
2008-06-09 18:03 ` Cornelia Huck
2008-06-10 3:11 ` Greg KH
2008-06-10 7:51 ` Cornelia Huck
2008-06-10 21:52 ` Greg KH
2008-06-10 3:09 ` Greg KH
2008-06-09 15:46 ` Kay Sievers
2008-06-09 15:58 ` Linus Torvalds
2008-06-10 3:07 ` 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=19f34abd0806090809h6d864fbahc10d41c0aacbfa08@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--cc=cornelia.huck@de.ibm.com \
--cc=gregkh@suse.de \
--cc=hidave.darkstar@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.kozlowski@tuxland.pl \
--cc=mingo@elte.hu \
--cc=neilb@suse.de \
--cc=rjw@sisk.pl \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®