From cf462e18838a8bf5cd1d450cc348d3252ca00b5c Mon Sep 17 00:00:00 2001 From: Himanshu Madhani Date: Thu, 1 Aug 2019 15:55:05 -0400 Subject: [PATCH 045/124] [scsi] scsi: qla2xxx: Set the qpair in SRB to NULL when SRB is released Message-id: <20190801155618.12650-46-hmadhani@redhat.com> Patchwork-id: 267822 O-Subject: [RHEL 7.8 e-stor PATCH 045/118] scsi: qla2xxx: Set the qpair in SRB to NULL when SRB is released Bugzilla: 1729270 RH-Acked-by: Jarod Wilson RH-Acked-by: Tony Camuso From: Giridhar Malavali Bugzilla 1729270 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 Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen (cherry picked from commit ae6ccb0f8153fe9e3b9287a74aa9742ea212e89c) Signed-off-by: Himanshu Madhani Signed-off-by: Jan Stancek --- drivers/scsi/qla2xxx/qla_inline.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index e396dd14ab5f..98f544fe8788 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -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); } -- 2.13.6