The patch titled
fix something in usb
has been added to the -mm tree. Its filename is
fix-something-in-usb.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
fix-something-in-scsi.patch
usb-storage-rearrange-stuff.patch
fix-something-in-usb.patch
From: Alan Stern <[EMAIL PROTECTED]>
This is the second of two patches for usb-storage. I don't think it really
addresses the problem raised by this bug report, but I could be wrong.
It's closely related, at any rate, and it does fix a real loophole.
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/usb/storage/usb.c | 13 +++++++++++++
1 files changed, 13 insertions(+)
diff -puN drivers/usb/storage/usb.c~fix-something-in-usb
drivers/usb/storage/usb.c
--- 25/drivers/usb/storage/usb.c~fix-something-in-usb Fri Jul 8 16:50:55 2005
+++ 25-akpm/drivers/usb/storage/usb.c Fri Jul 8 16:50:55 2005
@@ -833,6 +833,19 @@ static void quiesce_and_remove_host(stru
/* Wait for the current command to finish, then remove the host */
down(&us->dev_semaphore);
up(&us->dev_semaphore);
+
+ /* queuecommand won't accept any new commands and the control
+ * thread won't execute a previously-queued command. If there
+ * is such a command pending, complete it with an error. */
+ if (us->srb) {
+ us->srb->result = DID_NO_CONNECT << 16;
+ scsi_lock(us_to_host(us));
+ us->srb->scsi_done(us->srb);
+ us->srb = NULL;
+ scsi_unlock(us_to_host(us));
+ }
+
+ /* Now we own no commands so it's safe to remove the SCSI host */
scsi_remove_host(us_to_host(us));
}
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html