Skip to content

Commit

Permalink
[SCSI] stex: Fix for potential invalid response
Browse files Browse the repository at this point in the history
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 <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Ed Lin - PTU authored and James Bottomley committed Mar 12, 2009
1 parent a4976d6 commit dd48ebf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/stex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit dd48ebf

Please sign in to comment.