]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
add scsi advansys patch
authorChris Wright <chrisw@sous-sol.org>
Fri, 21 Mar 2008 15:48:29 +0000 (08:48 -0700)
committerChris Wright <chrisw@sous-sol.org>
Fri, 21 Mar 2008 15:48:29 +0000 (08:48 -0700)
queue-2.6.24/scsi-advansys-fix-bug-in-advloadmicrocode.patch [new file with mode: 0644]
queue-2.6.24/series

diff --git a/queue-2.6.24/scsi-advansys-fix-bug-in-advloadmicrocode.patch b/queue-2.6.24/scsi-advansys-fix-bug-in-advloadmicrocode.patch
new file mode 100644 (file)
index 0000000..15eec6e
--- /dev/null
@@ -0,0 +1,33 @@
+From stable-bounces@linux.kernel.org  Fri Mar 21 08:43:09 2008
+Date: Fri, 21 Mar 2008 15:15:03 GMT
+Message-Id: <200803211515.m2LFF3YX032293@hera.kernel.org>
+From: jejb@kernel.org
+To: jejb@kernel.org, stable@kernel.org
+Subject: SCSI advansys: Fix bug in AdvLoadMicrocode
+
+From: Matthew Wilcox <matthew@wil.cx>
+commit: 951b62c11e86acf8c55d9828aa8c921575023c29
+
+buf[i] can be up to 0xfd, so doubling it and assigning the result to an
+unsigned char truncates the value.  Just use an unsigned int instead;
+it's only a temporary.
+
+Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
+Cc: Stable Tree <stable@kernel.org>
+Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ drivers/scsi/advansys.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/advansys.c
++++ b/drivers/scsi/advansys.c
+@@ -6439,7 +6439,7 @@ static int AdvLoadMicrocode(AdvPortAddr 
+                       i += 2;
+                       len += 2;
+               } else {
+-                      unsigned char off = buf[i] * 2;
++                      unsigned int off = buf[i] * 2;
+                       unsigned short word = (buf[off + 1] << 8) | buf[off];
+                       AdvWriteWordAutoIncLram(iop_base, word);
+                       len += 2;
index e5ab2273753799d9fcb0635d4fa6739d672dc509..b6c1b6410ad9f60293bac91c393cfc234e8c6c21 100644 (file)
@@ -71,3 +71,4 @@ jbd2-correctly-unescape-journal-data-blocks.patch
 jbd-correctly-unescape-journal-data-blocks.patch
 aio-bad-aio-race-in-aio_complete-leads-to-process-hang.patch
 async_tx-avoid-the-async-xor_zero_sum-path-when-src_cnt-device-max_xor.patch
+scsi-advansys-fix-bug-in-advloadmicrocode.patch