On Thu, Dec 22, 2005 at 10:13:29PM -0800, Andrew Morton wrote: > > + struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data; > > + struct scsi_target *starget = wqw->starget; > > + struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); > > + unsigned long flags; > > + > > + kfree(wqw); > > + > > + spin_lock_irqsave(shost->host_lock, flags); > > + > > + 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; > > + > > + } > > + spin_unlock_irqrestore(shost->host_lock, flags); > > + > > + return; > > +} > > Given that this can run an arbitrary amount of time later on, how do we > know that *shost is still live? If there's still an starget, its parent shost must still be around, no? - : 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