Skip to contentSkip to conversation

stex: Fix for potential invalid request

PATCH RESEND In review ed.lin 2 participants 2 messages Jan 27, 2009 SCSI

lore
Share & tools
lore

ed.lin

author
#0 lore raw

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
index a3a18ad..6129db4 100644
@@ -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;
 
maintainer
#1 lore raw
Quoted 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.

---

drivers/scsi/stex.c +0 -0
index a3a18ad..6129db4 100644

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