lkml.org 
[lkml]   [2008]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [bug, 2.6.26-rc4/rc5] sporadic bootup crashes in blk_lookup_devt()/prepare_namespace()
On Mon, Jun 09, 2008 at 07:15:21PM +0200, Cornelia Huck wrote:
> On Mon, 9 Jun 2008 09:15:40 -0700 (PDT),
> Linus Torvalds <torvalds@linux-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?

Why would that be needed? We protect walking the class lists internally
with the lock, that should be sufficient, right?

thanks,

greg k-h


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