# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.641 -> 1.642
# drivers/usb/storage/transport.c 1.25 -> 1.26
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/07/15 [EMAIL PROTECTED] 1.642
# [PATCH] usb-storage: catch bad commands
#
# The purpose of this patch is to trap all commands which have a bogus
# request_bufflen. Much logic is devoted to calculating the proper length of
# the transfer, but according to discussions I've had on linux-scsi, this is
# really a bug in whatever is originating the bad command.
#
# Hopefully, after people use this patch for a while, we'll eliminate all the
# offending sources and can remove quite a bit of logic from the driver.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c Mon Jul 15 18:05:04 2002
+++ b/drivers/usb/storage/transport.c Mon Jul 15 18:05:04 2002
@@ -344,6 +344,12 @@
len = srb->request_bufflen;
}
+ /* According to the linux-scsi people, any command sent which
+ * violates this invariant is a bug. In the hopes of removing
+ * all the complex logic above, let's find them and eliminate them.
+ */
+ BUG_ON(len != srb->request_bufflen);
+
return len;
}
-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing
real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel