scsi: qla2xxx: Fix memory leak for allocating abort IOCB
authorQuinn Tran <quinn.tran@cavium.com>
Thu, 26 Jul 2018 23:34:44 +0000 (16:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 16:12:47 +0000 (18:12 +0200)
commitfa085d77929bf3267876f79816a67b82d515826b
tree62c79d12037ecd37a4291bae1dc7a6d608623737
parent71b7ca5795008efe082742473bd606b85bc65fd6
scsi: qla2xxx: Fix memory leak for allocating abort IOCB

commit 5e53be8e476a3397ed5383c23376f299555a2b43 upstream.

In the case of IOCB QFull, Initiator code can leave behind a stale pointer
to an SRB structure on the outstanding command array.

Fixes: 82de802ad46e ("scsi: qla2xxx: Preparation for Target MQ.")
Cc: stable@vger.kernel.org #v4.16+
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_iocb.c