[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080609200326.7530dd7a@gondolin.boeblingen.de.ibm.com>
Date: Mon, 9 Jun 2008 20:03:26 +0200
From: Cornelia Huck <cornelia.huck@...ibm.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Ingo Molnar <mingo@...e.hu>,
Vegard Nossum <vegard.nossum@...il.com>,
Adrian Bunk <bunk@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jens Axboe <jens.axboe@...cle.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Kay Sievers <kay.sievers@...y.org>, Neil Brown <neilb@...e.de>,
Mariusz Kozlowski <m.kozlowski@...land.pl>,
Dave Young <hidave.darkstar@...il.com>
Subject: Re: [bug, 2.6.26-rc4/rc5] sporadic bootup crashes in
blk_lookup_devt()/prepare_namespace()
On Mon, 9 Jun 2008 19:15:21 +0200,
Cornelia Huck <cornelia.huck@...ibm.com> wrote:
> On Mon, 9 Jun 2008 09:15:40 -0700 (PDT),
> Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
> > And this is all still ignoring the locking issue, of course. It would be
> > trivial to just remove the block_class_lock, and change
> >
> > mutex_[un]lock(&block_class_lock);
> >
> > into
> >
> > down|up(&block_class.sem);
> >
> > except for _one_ case, which is
> >
> > bdev_map = kobj_map_init(base_probe, &block_class_lock);
> >
> > which really wants a mutex, not a sempahore.
> >
> > So to fix that, we'd need to make the class->sem be a mutex, and pass that
> > in. Which is probably a good change too, but makes the whole thing much
> > bigger.
>
> The driver core changes in -next convert class->sem to
> class->p->class_mutex, which makes it non-accessible to drivers.
> Most of the locking is easily done through converting to the class
> iterator functions, but there are some cases where this is not going to
> work:
>
> - The {register,unregister}_blkdev() functions, which don't directly
> involve the class.
> - The iterators for /proc/partitions, which take the lock in
> part_start() and give it up again in part_stop().
>
> Maybe we need a possibilty for a driver to lock a class from outside?
Argh. I was just trying to hack up a patch when I realized that we had
to get a reference on the dynamic private structure when we take the
lock - which made the patch so ugly that I dare not post it. I'll see
if I have a better idea tomorrow (or someone beats me to it :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists