summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_srp.c
diff options
context:
space:
mode:
authorJustin Tee <justin.tee@broadcom.com>2024-10-31 23:32:15 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2024-11-03 02:45:24 +0100
commit4281f44ea8bfedd25938a0031bebba1473ece9ad (patch)
treee66f7e4458cc0ad3c9ff31b083093e6642638394 /drivers/scsi/scsi_transport_srp.c
parentscsi: lpfc: Add cleanup of nvmels_wq after HBA reset (diff)
downloadlinux-4281f44ea8bfedd25938a0031bebba1473ece9ad.tar.xz
linux-4281f44ea8bfedd25938a0031bebba1473ece9ad.zip
scsi: lpfc: Prevent NDLP reference count underflow in dev_loss_tmo callback
Current dev_loss_tmo handling checks whether there has been a previous call to unregister with SCSI transport. If so, the NDLP kref count is decremented a second time in dev_loss_tmo as the final kref release. However, this can sometimes result in a reference count underflow if there is also a race to unregister with NVMe transport as well. Add a check for NVMe transport registration before decrementing the final kref. If NVMe transport is still registered, then the NVMe transport unregistration is designated as the final kref decrement. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241031223219.152342-8-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_srp.c')
0 files changed, 0 insertions, 0 deletions