public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ips: fix data buffer accessors conversion bug
@ 2008-02-19  8:02 FUJITA Tomonori
  2008-02-19 12:29 ` Salyzyn, Mark
  0 siblings, 1 reply; 2+ messages in thread
From: FUJITA Tomonori @ 2008-02-19  8:02 UTC (permalink / raw)
  To: linux-scsi; +Cc: James.Bottomley, Mark_Salyzyn, lnxninja, fujita.tomonori

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 <fujita.tomonori@lab.ntt.co.jp>
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.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Tim Pepper <lnxninja@linux.vnet.ibm.com>
Cc: Salyzyn, Mark <Mark_Salyzyn@adaptec.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
---
 drivers/scsi/ips.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index bb152fb..7ed568f 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] ips: fix data buffer accessors conversion bug
  2008-02-19  8:02 [PATCH] ips: fix data buffer accessors conversion bug FUJITA Tomonori
@ 2008-02-19 12:29 ` Salyzyn, Mark
  0 siblings, 0 replies; 2+ messages in thread
From: Salyzyn, Mark @ 2008-02-19 12:29 UTC (permalink / raw)
  To: FUJITA Tomonori, linux-scsi@vger.kernel.org
  Cc: James.Bottomley@HansenPartnership.com,
	lnxninja@linux.vnet.ibm.com, fujita.tomonori@lab.ntt.co.jp

ACK

Wonderful work Tom and Fujita-san!

Sincerely -- Mark Salyzyn

> -----Original Message-----
> From: FUJITA Tomonori [mailto:tomof@acm.org]
> Sent: Tuesday, February 19, 2008 3:02 AM
> To: linux-scsi@vger.kernel.org
> Cc: James.Bottomley@HansenPartnership.com; Salyzyn, Mark;
> lnxninja@linux.vnet.ibm.com; fujita.tomonori@lab.ntt.co.jp
> Subject: [PATCH] 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 <fujita.tomonori@lab.ntt.co.jp>
> 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.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Cc: Tim Pepper <lnxninja@linux.vnet.ibm.com>
> Cc: Salyzyn, Mark <Mark_Salyzyn@adaptec.com>
> Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
> ---
>  drivers/scsi/ips.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
> index bb152fb..7ed568f 100644
> --- a/drivers/scsi/ips.c
> +++ b/drivers/scsi/ips.c
> @@ -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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-19 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-19  8:02 [PATCH] ips: fix data buffer accessors conversion bug FUJITA Tomonori
2008-02-19 12:29 ` Salyzyn, Mark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox