]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: lpfc: fix pci hot plug crash in list_add call
authorDick Kennedy <dick.kennedy@broadcom.com>
Sat, 30 Sep 2017 00:34:28 +0000 (17:34 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 8 Mar 2018 04:27:03 +0000 (20:27 -0800)
commit3f856d7b26681a2d546f1318f6a68d4c11182b4e
tree67aaa274906ad7707863bfc1a252ecd9d12c92ba
parent544d0f7a09c7b7c73d93b34940fd37f30339200e
scsi: lpfc: fix pci hot plug crash in list_add call

Orabug: 27631736

During pci hot plug, the kernel crashes in a list_add_call

The lookup by tag function will return null if the IOCB is out of range
or does not have the on txcmplq flag set.

Fix: Check for null return from lookup by tag.

Cc: <stable@vger.kernel.org> # 4.12+
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 401bb4169da655f3e5d28d0b208182e1ab60bf2a)
Signed-off-by: Dick dkennedy <dick.kennedy@broadcom.com>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c