On 08/07/05 11:36, James Bottomley wrote: > On Sun, 2005-08-07 at 10:59 -0400, Alan Stern wrote: > >>What sort of synchronization is there between scsi_remove_host and the >>error-handler thread? Offhand I can see two possible problems, depending >>on how the LLD is written: > > > There isn't any by design. > > I think you're not thinking about how this works correctly. What remove > host does is loop over the active devices removing them from visibility > and trying to do a final put on the generic devices before removing the > host from visibility and doing a final put on it. > > However, any outstanding user will have a reference and will keep all > the bits of the hierarchy in place until that reference is relinquished. Which automatically implies that any such entity (holding a ref) trying to do any kind of action to what it is holding, should get an error result, else it would be misled to believe that things are ok, when in fact the whole thing is coming down... Luben - : 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