[lkml]   [2006]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [BUG 2.6.17-git] kmem_cache_create: duplicate cache scsi_cmd_cache
On Fri, May 12, 2006 at 01:58:45PM -0500, James Bottomley wrote:
> On Fri, 2006-05-12 at 12:47 -0500, James Bottomley wrote:
> > I'll look at the release paths and see if I can work out what it is.
> OK, here's the scoop. The problem patch adds a get of driverfs_dev in
> add_disk(), but doesn't put it again until disk_release() (which occurs
> on final put_disk() of the gendisk).
> However, in SCSI, the driverfs_dev is the sdev_gendev. That means
> there's a reference held on sdev_gendev until final disk put.
> Unfortunately, we use the driver model driver_remove to trigger
> del_gendisk (which removes the gendisk from visibility and decrements
> the refcount), so we've introduced an unbreakable deadlock in the
> reference counting with this.

That explains why I could only trigger the bug with a disk attached to
the controller.

Thanks for figuring out,


+-- Erik Mouw -- -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-05-12 22:32    [W:0.054 / U:2.912 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site