projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fc66e7
)
scsi: lpfc: Fix hard lockup when reading the rx_monitor from debugfs
author
Justin Tee
<justin.tee@broadcom.com>
Mon, 17 Oct 2022 16:43:20 +0000
(09:43 -0700)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Sat, 22 Oct 2022 03:19:15 +0000
(
03:19
+0000)
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>
drivers/scsi/lpfc/lpfc_sli.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/lpfc/lpfc_sli.c
b/drivers/scsi/lpfc/lpfc_sli.c
index 768294b9bc0b0115583703d858b64ef2c474afb0..86ba45ac91c828b7833b5b4e4e26c29de140f29e 100644
(file)
--- a/
drivers/scsi/lpfc/lpfc_sli.c
+++ b/
drivers/scsi/lpfc/lpfc_sli.c
@@
-8150,10
+8150,10
@@
u32 lpfc_rx_monitor_report(struct lpfc_hba *phba,
"IO_cnt", "Info", "BWutil(ms)");
}
- /* Needs to be _
bh
because record is called from timer interrupt
+ /* Needs to be _
irq
because record is called from timer interrupt
* context
*/
- spin_lock_
bh
(ring_lock);
+ spin_lock_
irq
(ring_lock);
while (*head_idx != *tail_idx) {
entry = &ring[*head_idx];
@@
-8197,7
+8197,7
@@
u32 lpfc_rx_monitor_report(struct lpfc_hba *phba,
if (cnt >= max_read_entries)
break;
}
- spin_unlock_
bh
(ring_lock);
+ spin_unlock_
irq
(ring_lock);
return cnt;
}