scsi: qla2xxx: Fix memory leak when sending I/O fails
authorArun Easi <aeasi@marvell.com>
Tue, 5 Nov 2019 15:06:55 +0000 (07:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 18:55:30 +0000 (19:55 +0100)
commit402f7198311f84a8b56183923532f57a3cc1b63f
treeaf007c729cc38131770fe56eb360578ad9746589
parent31c1f455203e56a3ce8d5dd92f37c83d07bd5bd5
scsi: qla2xxx: Fix memory leak when sending I/O fails

commit 2f856d4e8c23f5ad5221f8da4a2f22d090627f19 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_os.c