scsi: qla2xxx: Fix NULL pointer access for fcport structure
authorQuinn Tran <quinn.tran@cavium.com>
Thu, 28 Dec 2017 20:33:09 +0000 (12:33 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Mar 2018 11:06:45 +0000 (12:06 +0100)
commit31de69d5c9b83c066cf7cf0774912e01fc4ef530
treebded2f66b307b7ea8454a69be0cfd3b909b6574a
parent8cdd1908c17492cb6176d63d279de2534342b369
scsi: qla2xxx: Fix NULL pointer access for fcport structure

commit 5c25d451163cab9be80744cbc5448d6b95ab8d1a upstream.

when processing iocb in a timeout case, driver was trying to log messages
without verifying if the fcport structure could have valid data. This
results in a NULL pointer access.

Fixes: 726b85487067("qla2xxx: Add framework for async fabric discovery")
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_init.c