stex: Fix for potential invalid request
PATCH RESEND 1/5 stex: Fix for potential invalid request
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 that 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.
---
drivers/scsi/stex.c +1 -0
@@ -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;
James Bottomley
maintainerQuoted 14 lines · ed.lin
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 that 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 <[email protected]>---
drivers/scsi/stex.c +0
-0
drivers/scsi/stex.c static void stex_mu_intr(struct st_hba *hba, u32 doorbell) · line 749
Quoted 4 lines
drivers/scsi/stex.c +1
-0@@ -746,6 +746,7 @@ static void stex_mu_intr(struct st_hba *hba, u32 doorbell)stex_copy_data (ccb, resp, size); } + ccb->req =NULL ;
^^^^^^^^
I'm afraid all the tabs have been converted to single spaces in this one.
Just mime attach the patches ... we can play the tune the email client game later.
James