On Thu, 2005-09-15 at 21:52 -0400, Alan Stern wrote: > You're forgetting something: Devices can be removed at any time, no matter > what state the host is in. It's even possible for thread A to be removing > a device while thread B is removing the host. The A thread will interfere > with the B thread, because the "list_for_each_entry_safe" loops in > scsi_forget_host and __scsi_remove_target _aren't_ safe against other > threads removing devices. Also remember that the list pointers get > changed when a device is _released_, which can occur quite some time after > it is _removed_. > > In short, those iterations must be carried out as in my patch. OK, I concede the point ... I'll put it in. > Finally, having said all that, it turns out there's still a bug in the > 2.6.14-rc1 code. I feel pretty stupid about it -- you'll understand why > when you read the patch below. Heh, yes, got that one in too. James - : 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