From: Giridhar Malavali Date: Tue, 2 Apr 2019 21:24:21 +0000 (-0700) Subject: scsi: qla2xxx: Set the qpair in SRB to NULL when SRB is released X-Git-Tag: Ubuntu-5.13.0-19.19~8603^2~147 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ae6ccb0f8153fe9e3b9287a74aa9742ea212e89c;p=mirror_ubuntu-jammy-kernel.git scsi: qla2xxx: Set the qpair in SRB to NULL when SRB is released 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 --- 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 @@ 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); }