* [PATCH 1/5] stex: Fix for potential invalid response
@ 2009-01-26 10:40 Ed Lin - PTU
2009-01-26 11:31 ` Jeff Garzik
2009-01-26 19:16 ` James Bottomley
0 siblings, 2 replies; 4+ messages in thread
From: Ed Lin - PTU @ 2009-01-26 10:40 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, Promise_Linux
The interrupt routine is good for normal cases. However, if the firmware
is abnormal and returns an invalid response, the driver may reuse a
ccb structure which has already been handled. This may cause problem.
Fix this by setting the req member to NULL. Next time we know the
response is invalid and handle accordingly if req is NULL.
Signed-off-by: Ed Lin <ed.lin@promise.com>
---
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index a3a18ad..6129db4 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -746,6 +746,7 @@ static void stex_mu_intr(struct st_hba *hba, u32
doorbell)
stex_copy_data(ccb, resp, size);
}
+ ccb->req = NULL;
ccb->srb_status = resp->srb_status;
ccb->scsi_status = resp->scsi_status;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] stex: Fix for potential invalid response
2009-01-26 10:40 [PATCH 1/5] stex: Fix for potential invalid response Ed Lin - PTU
@ 2009-01-26 11:31 ` Jeff Garzik
2009-01-26 19:16 ` James Bottomley
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2009-01-26 11:31 UTC (permalink / raw)
To: Ed Lin - PTU; +Cc: James.Bottomley, linux-scsi, Promise_Linux
Ed Lin - PTU wrote:
> The interrupt routine is good for normal cases. However, if the firmware
> is abnormal and returns an invalid response, the driver may reuse a
> ccb structure which has already been handled. This may cause problem.
> Fix this by setting the req member to NULL. Next time we know the
> response is invalid and handle accordingly if req is NULL.
>
> Signed-off-by: Ed Lin <ed.lin@promise.com>
> ---
>
> diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
> index a3a18ad..6129db4 100644
> --- a/drivers/scsi/stex.c
> +++ b/drivers/scsi/stex.c
> @@ -746,6 +746,7 @@ static void stex_mu_intr(struct st_hba *hba, u32
> doorbell)
> stex_copy_data(ccb, resp, size);
> }
>
> + ccb->req = NULL;
> ccb->srb_status = resp->srb_status;
> ccb->scsi_status = resp->scsi_status;
ACK patches 1-5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] stex: Fix for potential invalid response
2009-01-26 10:40 [PATCH 1/5] stex: Fix for potential invalid response Ed Lin - PTU
2009-01-26 11:31 ` Jeff Garzik
@ 2009-01-26 19:16 ` James Bottomley
2009-01-26 21:53 ` Ed Lin - PTU
1 sibling, 1 reply; 4+ messages in thread
From: James Bottomley @ 2009-01-26 19:16 UTC (permalink / raw)
To: Ed Lin - PTU; +Cc: linux-scsi, Promise_Linux
On Mon, 2009-01-26 at 02:40 -0800, Ed Lin - PTU wrote:
> The interrupt routine is good for normal cases. However, if the firmware
> is abnormal and returns an invalid response, the driver may reuse a
> ccb structure which has already been handled. This may cause problem.
> Fix this by setting the req member to NULL. Next time we know the
> response is invalid and handle accordingly if req is NULL.
>
> Signed-off-by: Ed Lin <ed.lin@promise.com>
> ---
>
> diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
> index a3a18ad..6129db4 100644
> --- a/drivers/scsi/stex.c
> +++ b/drivers/scsi/stex.c
> @@ -746,6 +746,7 @@ static void stex_mu_intr(struct st_hba *hba, u32
> doorbell)
The patches generally look fine. Unfortunately your email tool has
broken the line ends of most of them (like the above) which makes it
almost impossible to apply them. Could you resend with this fixed up?
Thanks,
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 1/5] stex: Fix for potential invalid response
2009-01-26 19:16 ` James Bottomley
@ 2009-01-26 21:53 ` Ed Lin - PTU
0 siblings, 0 replies; 4+ messages in thread
From: Ed Lin - PTU @ 2009-01-26 21:53 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi, Promise_Linux
>-----Original Message-----
>From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
>Sent: 2009年1月26日 11:17
>To: Ed Lin - PTU
>Cc: linux-scsi@vger.kernel.org; Promise_Linux
>Subject: Re: [PATCH 1/5] stex: Fix for potential invalid response
>
>
>On Mon, 2009-01-26 at 02:40 -0800, Ed Lin - PTU wrote:
>> The interrupt routine is good for normal cases. However, if
>the firmware
>> is abnormal and returns an invalid response, the driver may reuse a
>> ccb structure which has already been handled. This may cause problem.
>> Fix this by setting the req member to NULL. Next time we know the
>> response is invalid and handle accordingly if req is NULL.
>>
>> Signed-off-by: Ed Lin <ed.lin@promise.com>
>> ---
>>
>> diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
>> index a3a18ad..6129db4 100644
>> --- a/drivers/scsi/stex.c
>> +++ b/drivers/scsi/stex.c
>> @@ -746,6 +746,7 @@ static void stex_mu_intr(struct st_hba *hba, u32
>> doorbell)
>
>The patches generally look fine. Unfortunately your email tool has
>broken the line ends of most of them (like the above) which makes it
>almost impossible to apply them. Could you resend with this fixed up?
>
Sure, I will do it shortly. Please let me know if it's still broken.
Sorry for the inconvenience.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-26 22:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26 10:40 [PATCH 1/5] stex: Fix for potential invalid response Ed Lin - PTU
2009-01-26 11:31 ` Jeff Garzik
2009-01-26 19:16 ` James Bottomley
2009-01-26 21:53 ` Ed Lin - PTU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox