Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
scsi: wd33c93: Don't use stale scsi_pointer value
Browse files Browse the repository at this point in the history
commit 9023ed8 upstream.

A regression was introduced with commit dbb2da5 ("scsi: wd33c93:
Move the SCSI pointer to private command data") which results in an oops
in wd33c93_intr(). That commit added the scsi_pointer variable and
initialized it from hostdata->connected. However, during selection,
hostdata->connected is not yet valid. Fix this by getting the current
scsi_pointer from hostdata->selecting.

Cc: Daniel Palmer <[email protected]>
Cc: Michael Schmitz <[email protected]>
Cc: [email protected]
Fixes: dbb2da5 ("scsi: wd33c93: Move the SCSI pointer to private command data")
Signed-off-by: Daniel Palmer <[email protected]>
Co-developed-by: Finn Thain <[email protected]>
Signed-off-by: Finn Thain <[email protected]>
Link: https://lore.kernel.org/r/09e11a0a54e6aa2a88bd214526d305aaf018f523.1727926187.git.fthain@linux-m68k.org
Reviewed-by: Michael Schmitz <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
fifteenhex authored and gregkh committed Oct 15, 2024
1 parent 78f3b8f commit 3e0d4f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/wd33c93.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ wd33c93_intr(struct Scsi_Host *instance)
/* construct an IDENTIFY message with correct disconnect bit */

hostdata->outgoing_msg[0] = IDENTIFY(0, cmd->device->lun);
if (scsi_pointer->phase)
if (WD33C93_scsi_pointer(cmd)->phase)
hostdata->outgoing_msg[0] |= 0x40;

if (hostdata->sync_stat[cmd->device->id] == SS_FIRST) {
Expand Down

0 comments on commit 3e0d4f2

Please sign in to comment.