On Mon, Feb 06, James Bottomley wrote: > On Mon, 2006-02-06 at 23:04 +0100, Olaf Hering wrote: > > I need help on this one. > > What I have so far (via git-bisect) is: > > My guess would be this patch: > > > commit > 863a930a40eb7f2d18534c2c166b22582f5c6cfd > [SCSI] fix scsi_reap_target() device_del from atomic context I'm testing this patch now. +++ linux-2.6.16-rc2-olh/drivers/scsi/scsi_scan.c @@ -428,18 +428,19 @@ static void scsi_target_reap_work(void * */ void scsi_target_reap(struct scsi_target *starget) { - struct work_queue_wrapper *wqw = - kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC); + struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); + unsigned long flags; + spin_lock_irqsave(shost->host_lock, flags); - if (!wqw) { - starget_printk(KERN_ERR, starget, - "Failed to allocate memory in scsi_reap_target()\n"); + if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { + list_del_init(&starget->siblings); + spin_unlock_irqrestore(shost->host_lock, flags); + device_del(&starget->dev); + transport_unregister_device(&starget->dev); + put_device(&starget->dev); return; } - - INIT_WORK(&wqw->work, scsi_target_reap_work, wqw); - wqw->starget = starget; - schedule_work(&wqw->work); + spin_unlock_irqrestore(shost->host_lock, flags); } /** -- short story of a lazy sysadmin: alias appserv=wotan - : 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