lkml.org 
[lkml]   [2008]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [bug, 2.6.26-rc4/rc5] sporadic bootup crashes in blk_lookup_devt()/prepare_namespace()
From
Date
On Mon, 2008-06-09 at 08:29 -0700, Linus Torvalds wrote:
> On Mon, 9 Jun 2008, Cornelia Huck wrote:
> >
> > Does this crash happen with the conversion to the class iterator
> > functions (should be in linux-next) as well? They take the class
> > mutex...
>
> I really don't think it's the locking, although I do agree that the
> locking looks bogus _too_.
>
> I suspect that the problem is even simpler than that. On the
> "block_class.devices" list we can have two types of devices: the ones that
> have been added by the block/genhd.c code (disks: dev->type "disk_type"),
> and the ones that are added by the class layer for partitions (partitions:
> dev.type "part_type").
>
> And *all* the block/genhd.c loops over that device list look like this:
>
> list_for_each_entry(dev, &block_class.devices, node) {
> if (dev->type != &disk_type)
> continue;
> sgp = dev_to_disk(dev);
> ...
>
> because you cannot do that "dev_to_disk()" on a partition entry (it won't
> have a container of type gendisk, it will be of type hd_struct).
>
> Well, all except one. Guess which one..
>
> So I suspect that (a) yes, we need to fix the locking, but (b) the fix for
> this particular bug is probably the trivial one appended.
>
> And yes, this bug was introduced by commit 30f2f0eb4b ("block: do_mounts -
> accept root=<non-existant partition>"), so the alternative is to revert it
> entirely. Kay?

Yeah, the patch looks fine. That could be the reason.

I think we should keep the patch, as it fixed a different issue, and it
seems the bug was there even before the patch - the function was just
not called 3 times, so even more unlikely to trigger it.

Thanks,
Kay



\
 
 \ /
  Last update: 2008-06-09 17:49    [W:0.128 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site