scsi: qla2xxx: Fix panic from use after free in qla2x00_async_tm_cmd
authorBill Kuzeja <William.Kuzeja@stratus.com>
Tue, 12 Feb 2019 14:29:50 +0000 (09:29 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 13 Feb 2019 03:23:12 +0000 (22:23 -0500)
commit388a49959ee4e4e99f160241d9599efa62cd4299
tree9b19dbaacda71ed50f59866f858aeda7171da0b6
parente4a056987c86f402f1286e050b1dee3f4ce7c7eb
scsi: qla2xxx: Fix panic from use after free in qla2x00_async_tm_cmd

In qla2x00_async_tm_cmd, we reference off sp after it has been freed.  This
caused a panic on a system running a slub debug kernel. Since fcport is
passed in anyways, just use that instead.

Signed-off-by: Bill Kuzeja <william.kuzeja@stratus.com>
Acked-by: Giridhar Malavali <gmalavali@marvell.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_init.c