Re: [linux-usb-devel] oops on usb storage device disconnect with 2.6.14-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux