]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
scsi: qla2xxx: Set the qpair in SRB to NULL when SRB is released
authorGiridhar Malavali <gmalavali@marvell.com>
Tue, 2 Apr 2019 21:24:21 +0000 (14:24 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Apr 2019 03:11:36 +0000 (23:11 -0400)
This patch sets QPair pointer to NULL to prevent abort command racing ahead
of normal command completion handling during scsi_done call.

Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_inline.h

index 512c3c37b447f2be2fd3bc01b7ed6b2d758a1490..07c3f45d4bd7cc3f2b6cdcaef76ed433f3714dcc 100644 (file)
@@ -240,6 +240,7 @@ done:
 static inline void
 qla2xxx_rel_qpair_sp(struct qla_qpair *qpair, srb_t *sp)
 {
+       sp->qpair = NULL;
        mempool_free(sp, qpair->srb_mempool);
        QLA_QPAIR_MARK_NOT_BUSY(qpair);
 }