diff options
| author | James Smart <[email protected]> | 2020-10-20 13:27:11 -0700 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2020-10-26 21:42:37 -0400 |
| commit | 62e3a931db60daf94fdb3159d685a5bc6ad4d0cf (patch) | |
| tree | 1006e1a6feaa1ac8a0fd695716868cf85d86ed62 /tools/perf/scripts/python/flamegraph.py | |
| parent | c8ed1ff88c02e55bf9fa3244624e431f4f374077 (diff) | |
scsi: lpfc: Fix invalid sleeping context in lpfc_sli4_nvmet_alloc()
The following calltrace was seen:
BUG: sleeping function called from invalid context at mm/slab.h:494
...
Call Trace:
dump_stack+0x9a/0xf0
___might_sleep.cold.63+0x13d/0x178
slab_pre_alloc_hook+0x6a/0x90
kmem_cache_alloc_trace+0x3a/0x2d0
lpfc_sli4_nvmet_alloc+0x4c/0x280 [lpfc]
lpfc_post_rq_buffer+0x2e7/0xa60 [lpfc]
lpfc_sli4_hba_setup+0x6b4c/0xa4b0 [lpfc]
lpfc_pci_probe_one_s4.isra.15+0x14f8/0x2280 [lpfc]
lpfc_pci_probe_one+0x260/0x2880 [lpfc]
local_pci_probe+0xd4/0x180
work_for_cpu_fn+0x51/0xa0
process_one_work+0x8f0/0x17b0
worker_thread+0x536/0xb50
kthread+0x30c/0x3d0
ret_from_fork+0x3a/0x50
A prior patch introduced a spin_lock_irqsave(hbalock) in the
lpfc_post_rq_buffer() routine. Call trace is seen as the hbalock is held
with interrupts disabled during a GFP_KERNEL allocation in
lpfc_sli4_nvmet_alloc().
Fix by reordering locking so that hbalock not held when calling
sli4_nvmet_alloc() (aka rqb_buf_list()).
Link: https://lore.kernel.org/r/[email protected]
Fixes: 411de511c694 ("scsi: lpfc: Fix RQ empty firmware trap")
Cc: <[email protected]> # v4.17+
Co-developed-by: Dick Kennedy <[email protected]>
Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions