scsi: lpfc: Fix lockdep warning for rx_monitor lock when unloading driver
authorJustin Tee <justin.tee@broadcom.com>
Wed, 1 Mar 2023 23:16:19 +0000 (15:16 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 10 Mar 2023 02:21:44 +0000 (21:21 -0500)
commitc0d6071aa26f2989fada9a66b216419965f207db
tree48a37ab0cfa090f490055f35be59ae52eabb6982
parentbf21c9bb624c85f499be271cc1b3d41bec50f7bd
scsi: lpfc: Fix lockdep warning for rx_monitor lock when unloading driver

Lockdep enabled kernels report a theoretical deadlock state where the
cmf_timer interrupt occurs while the rx_monitor ring is being destroyed.

During rmmod, the cmf_timer is cancelled prior to the
lpfc_rx_monitor_destroy_ring call.  This actually eliminates the need to
take the rx_monitor ring lock in lpfc_rx_monitor_destroy_ring.  Thus, just
remove lock/unlock of rx_monitor in lpfc_rx_monitor_destroy_ring.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230301231626.9621-4-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c