]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scsi: lpfc: Fix kernel crash at lpfc_nvme_info_show during remote port bounce
authorJames Smart <jsmart2021@gmail.com>
Tue, 5 Nov 2019 00:57:00 +0000 (16:57 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 7 Apr 2020 15:40:08 +0000 (10:40 -0500)
commite35dc794fcdd1c1c6dcf40179f27005f2c451a4f
treea2a9e8b91b7cb0bc01efd214d171701a94725590
parent4f175d5b6bca157f21cd858f2c8f6a2e36a10174
scsi: lpfc: Fix kernel crash at lpfc_nvme_info_show during remote port bounce

BugLink: https://bugs.launchpad.net/bugs/1855303
When reading sysfs nvme_info file while a remote port leaves and comes
back, a NULL pointer is encountered. The issue is due to ndlp list
corruption as the the nvme_info_show does not use the same lock as the rest
of the code.

Correct by removing the rcu_xxx_lock calls and replace by the host_lock and
phba->hbaLock spinlocks that are used by the rest of the driver.  Given
we're called from sysfs, we are safe to use _irq rather than _irqsave.

Link: https://lore.kernel.org/r/20191105005708.7399-4-jsmart2021@gmail.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>
(cherry picked from commit 6c1e803eac846f886cd35131e6516fc51a8414b9)
Signed-off-by: Vignesh Gunasekaran <vignesh.gunasekaran@broadcom.com>
Signed-off-by: Jeff Lane <jeffrey.lane@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/lpfc/lpfc_attr.c