]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix crash caused by switch reboot
authorJames Smart <jsmart2021@gmail.com>
Mon, 1 Mar 2021 17:18:16 +0000 (09:18 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Mar 2021 22:37:05 +0000 (17:37 -0500)
commit41b6fba53cbf051199a2e49a688c945fcc32d077
tree56ced87beab3ffddb18c304683944c2513906780
parentd3aeb1439843ebe3824dd4a53ece61c9bca04315
scsi: lpfc: Fix crash caused by switch reboot

Driver is causing a crash in __lpfc_sli_release_iocbq_s4() when it
dereferences the els_wq which is NULL.

Validate the pring for the els_wq before dereferencing. Reorg the code to
move the pring assignment closer to where it is actually used.

Link: https://lore.kernel.org/r/20210301171821.3427-18-jsmart2021@gmail.com
Co-developed-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c