ips: fix data buffer accessors conversion bug
Subsystems (3)
PATCH 1/1 ips: fix data buffer accessors conversion bug
There is one more bug in ips. I think that this needs to go to scsi-rc-fixes, 2.6.24-stable, and 2.6.23-stable though we might rarely hit this bug.
=
From: FUJITA Tomonori <[email protected]>
Date: Tue, 19 Feb 2008 16:03:47 +0900
Subject: [PATCH] ips: fix data buffer accessors conversion bug
This fixes a bug that can't handle a passthru command with more than two sg entries.
Big thanks to Tim Pepper for debugging the problem.
--- drivers/scsi/ips.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/ips.c +1 -1
@@ -1576,7 +1576,7 @@ ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr)METHOD_TRACE ("ips_make_passthru" ,1 );scsi_for_each_sg (SC , sg,scsi_sg_count (SC ), i) - length += sg[i].length; + length += sg->length;if (length <sizeof (ips_passthru_t)) {/* wrong size */
Signature · 1 line
1.5.3.7
ACK
Wonderful work Tom and Fujita-san!
Sincerely -- Mark Salyzyn
Quoted 48 lines
-----Original Message-----
From: FUJITA Tomonori [mailto:[email protected]]
Sent: Tuesday, February 19, 2008 3:02 AM
To: [email protected]
Cc: [email protected]; Salyzyn, Mark; [email protected]; [email protected]
Subject: [PATCH] ips: fix data buffer accessors conversion bugThere is one more bug in ips. I think that this needs to go to scsi-rc-fixes, 2.6.24-stable, and 2.6.23-stable though we might rarely hit this bug.
=
From: FUJITA Tomonori <[email protected]>
Date: Tue, 19 Feb 2008 16:03:47 +0900
Subject: [PATCH] ips: fix data buffer accessors conversion bugThis fixes a bug that can't handle a passthru command with more than two sg entries.
Big thanks to Tim Pepper for debugging the problem.
Signed-off-by FUJITA Tomonori <[email protected]>Cc Tim Pepper <[email protected]>Cc Salyzyn, Mark <[email protected]>Cc James Bottomley <[email protected]>--- drivers/scsi/ips.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/scsi/ips.c +1
-1@@ -1576,7 +1576,7 @@ ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr)METHOD_TRACE ("ips_make_passthru" ,1 );scsi_for_each_sg (SC , sg,scsi_sg_count (SC ), i) - length += sg[i].length; + length += sg->length;if (length <sizeof (ips_passthru_t)) {/* wrong size */--
1.5.3.7