On heavy loads, a memory leak of the srb_t structure is observed. This
would make the qla2xxx_srbs cache gobble up memory.
Fixes:
219d27d7147e0 ("scsi: qla2xxx: Fix race conditions in the code for aborting SCSI commands")
Cc: stable@vger.kernel.org # 5.2
Link: https://lore.kernel.org/r/20191105150657.8092-7-hmadhani@marvell.com
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
qc24_host_busy_free_sp:
sp->free(sp);
+ CMD_SP(cmd) = NULL;
+ qla2x00_rel_sp(sp);
qc24_target_busy:
return SCSI_MLQUEUE_TARGET_BUSY;
qc24_host_busy_free_sp:
sp->free(sp);
+ CMD_SP(cmd) = NULL;
+ qla2xxx_rel_qpair_sp(sp->qpair, sp);
qc24_target_busy:
return SCSI_MLQUEUE_TARGET_BUSY;