Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit e04642a

Browse files
fifteenhexgregkh
authored andcommitted
scsi: wd33c93: Don't use stale scsi_pointer value
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 <daniel@0x0f.com> Cc: Michael Schmitz <schmitzmic@gmail.com> Cc: stable@kernel.org Fixes: dbb2da5 ("scsi: wd33c93: Move the SCSI pointer to private command data") Signed-off-by: Daniel Palmer <daniel@0x0f.com> Co-developed-by: Finn Thain <fthain@linux-m68k.org> Signed-off-by: Finn Thain <fthain@linux-m68k.org> Link: https://lore.kernel.org/r/09e11a0a54e6aa2a88bd214526d305aaf018f523.1727926187.git.fthain@linux-m68k.org Reviewed-by: Michael Schmitz <schmitzmic@gmail.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8676393 commit e04642a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/wd33c93.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ wd33c93_intr(struct Scsi_Host *instance)
831831
/* construct an IDENTIFY message with correct disconnect bit */
832832

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

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

0 commit comments

Comments
 (0)