linux/drivers/scsi/lpfc
Justin Tee c44e50f4a0 scsi: lpfc: Fix hard lockup when reading the rx_monitor from debugfs
During I/O and simultaneous cat of /sys/kernel/debug/lpfc/fnX/rx_monitor, a
hard lockup similar to the call trace below may occur.

The spin_lock_bh in lpfc_rx_monitor_report is not protecting from timer
interrupts as expected, so change the strength of the spin lock to _irq.

Kernel panic - not syncing: Hard LOCKUP
CPU: 3 PID: 110402 Comm: cat Kdump: loaded

exception RIP: native_queued_spin_lock_slowpath+91

[IRQ stack]
 native_queued_spin_lock_slowpath at ffffffffb814e30b
 _raw_spin_lock at ffffffffb89a667a
 lpfc_rx_monitor_record at ffffffffc0a73a36 [lpfc]
 lpfc_cmf_timer at ffffffffc0abbc67 [lpfc]
 __hrtimer_run_queues at ffffffffb8184250
 hrtimer_interrupt at ffffffffb8184ab0
 smp_apic_timer_interrupt at ffffffffb8a026ba
 apic_timer_interrupt at ffffffffb8a01c4f
[End of IRQ stack]

 apic_timer_interrupt at ffffffffb8a01c4f
 lpfc_rx_monitor_report at ffffffffc0a73c80 [lpfc]
 lpfc_rx_monitor_read at ffffffffc0addde1 [lpfc]
 full_proxy_read at ffffffffb83e7fc3
 vfs_read at ffffffffb833fe71
 ksys_read at ffffffffb83402af
 do_syscall_64 at ffffffffb800430b
 entry_SYSCALL_64_after_hwframe at ffffffffb8a000ad

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20221017164323.14536-2-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-10-22 03:19:15 +00:00
..
lpfc_attr.c scsi: lpfc: Remove SANDiags related code 2022-08-31 23:39:58 -04:00
lpfc_attr.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_bsg.c scsi: lpfc: Remove unneeded result variable 2022-09-01 00:39:05 -04:00
lpfc_bsg.h scsi: lpfc: Copyright updates for 14.2.0.5 patches 2022-07-07 17:21:44 -04:00
lpfc_compat.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_crtn.h scsi: lpfc: Add reporting capability for Link Degrade Signaling 2022-09-15 22:18:27 -04:00
lpfc_ct.c scsi: lpfc: Rework FDMI attribute registration for unintential padding 2022-09-15 22:18:27 -04:00
lpfc_debugfs.c scsi: lpfc: Fix various issues reported by tools 2022-09-15 22:18:28 -04:00
lpfc_debugfs.h scsi: lpfc: Copyright updates for 14.2.0.6 patches 2022-08-31 23:39:58 -04:00
lpfc_disc.h scsi: lpfc: Fix multiple NVMe remoteport registration calls for the same NPort ID 2022-09-15 22:18:27 -04:00
lpfc_els.c scsi: lpfc: Add reporting capability for Link Degrade Signaling 2022-09-15 22:18:27 -04:00
lpfc_hbadisc.c treewide: use get_random_{u8,u16}() when possible, part 1 2022-10-11 17:42:58 -06:00
lpfc_hw.h scsi: lpfc: Rework FDMI attribute registration for unintential padding 2022-09-15 22:18:27 -04:00
lpfc_hw4.h scsi: lpfc: Add reporting capability for Link Degrade Signaling 2022-09-15 22:18:27 -04:00
lpfc_ids.h scsi: lpfc: Copyright updates for 14.2.0.5 patches 2022-07-07 17:21:44 -04:00
lpfc_init.c SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
lpfc_logmsg.h scsi: lpfc: Add reporting capability for Link Degrade Signaling 2022-09-15 22:18:27 -04:00
lpfc_mbox.c scsi: lpfc: Copyright updates for 14.2.0.2 patches 2022-04-18 22:48:48 -04:00
lpfc_mem.c scsi: lpfc: Copyright updates for 14.2.0.6 patches 2022-08-31 23:39:58 -04:00
lpfc_nl.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_nportdisc.c scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology 2022-06-07 21:38:18 -04:00
lpfc_nvme.c scsi: lpfc: Fix uninitialized cqe field in lpfc_nvme_cancel_iocb() 2022-07-07 17:21:42 -04:00
lpfc_nvme.h scsi: lpfc: Copyright updates for 14.2.0.0 patches 2022-03-15 13:51:50 -04:00
lpfc_nvmet.c scsi: lpfc: Refactor lpfc_nvmet_prep_abort_wqe() into lpfc_sli_prep_abort_xri() 2022-07-07 17:21:44 -04:00
lpfc_scsi.c SCSI misc on 20221007 2022-10-07 12:33:18 -07:00
lpfc_scsi.h scsi: lpfc: Copyright updates for 14.2.0.6 patches 2022-08-31 23:39:58 -04:00
lpfc_sli.c scsi: lpfc: Fix hard lockup when reading the rx_monitor from debugfs 2022-10-22 03:19:15 +00:00
lpfc_sli.h scsi: lpfc: Remove Menlo/Hornet related code 2022-07-07 17:21:44 -04:00
lpfc_sli4.h scsi: lpfc: Fix various issues reported by tools 2022-09-15 22:18:28 -04:00
lpfc_version.h scsi: lpfc: Update lpfc version to 14.2.0.7 2022-09-15 22:18:28 -04:00
lpfc_vmid.c scsi: lpfc: Fix various issues reported by tools 2022-09-15 22:18:28 -04:00
lpfc_vport.c scsi: lpfc: Remove SANDiags related code 2022-08-31 23:39:58 -04:00
lpfc_vport.h scsi: lpfc: Copyright updates for 14.2.0.6 patches 2022-08-31 23:39:58 -04:00
lpfc.h scsi: lpfc: Add reporting capability for Link Degrade Signaling 2022-09-15 22:18:27 -04:00
Makefile scsi: lpfc: Commonize VMID code location 2022-05-19 20:24:56 -04:00