Chris Webb <chris@xxxxxxxxxxxx> writes: > James Bottomley <James.Bottomley@xxxxxxx> writes: > > > Actually, if that works, I'll have the above backported as well. > > Hi James. That's much better; thanks! I certainly can't provoke any problems > with it in a VM, although I couldn't really reproduce the problem with the > original kernel in a test environment either. I'll push it to our clusters > and see how things go over the next week or so. We've been running with this for a couple of weeks now, and I haven't seen the crash repeat itself. That said, I applied this on top to see if I could detect the race: diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1936,6 +1936,8 @@ sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", sdp->removable ? "removable " : ""); + if (atomic_read(&sdkp->dev.kobj.kref.refcount) < 2) + sd_printk(KERN_WARNING, sdkp, "Attempted to release device before sd_probe_async complete\n"); put_device(&sdkp->dev); } and it hasn't triggered at all, so I wonder whether we've just not hit the bug again. Best wishes, Chris. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html