diff mbox series

[v2,02/15] qla2xxx: Set the qpair in SRB to NULL when SRB is released

Message ID 20190402212434.28469-3-hmadhani@marvell.com (mailing list archive)
State Mainlined
Commit ae6ccb0f8153fe9e3b9287a74aa9742ea212e89c
Headers show
Series qla2xxx: Misc updates and bug fixes for the driver. | expand

Commit Message

Himanshu Madhani April 2, 2019, 9:24 p.m. UTC
From: Giridhar Malavali <gmalavali@marvell.com>

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>
---
 drivers/scsi/qla2xxx/qla_inline.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
index 512c3c37b447..07c3f45d4bd7 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -240,6 +240,7 @@  qla2xxx_get_qpair_sp(scsi_qla_host_t *vha, struct qla_qpair *qpair,
 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);
 }