Commit 6206b79
qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
Liajian reported a bug_on hit on a ThunderX2 arm64 server with FastLinQ
QL41000 ethernet controller:
BUG: scheduling while atomic: kworker/0:4/531/0x00000200
[qed_probe:488()]hw prepare failed
kernel BUG at mm/vmalloc.c:2355!
Internal error: Oops - BUG: 0 [Freescale#1] SMP
CPU: 0 PID: 531 Comm: kworker/0:4 Tainted: G W 5.4.0-77-generic Freescale#86-Ubuntu
pstate: 00400009 (nzcv daif +PAN -UAO)
Call trace:
vunmap+0x4c/0x50
iounmap+0x48/0x58
qed_free_pci+0x60/0x80 [qed]
qed_probe+0x35c/0x688 [qed]
__qede_probe+0x88/0x5c8 [qede]
qede_probe+0x60/0xe0 [qede]
local_pci_probe+0x48/0xa0
work_for_cpu_fn+0x24/0x38
process_one_work+0x1d0/0x468
worker_thread+0x238/0x4e0
kthread+0xf0/0x118
ret_from_fork+0x10/0x18
In this case, qed_hw_prepare() returns error due to hw/fw error, but in
theory work queue should be in process context instead of interrupt.
The root cause might be the unpaired spin_{un}lock_bh() in
_qed_mcp_cmd_and_union(), which causes botton half is disabled incorrectly.
Reported-by: Lijian Zhang <Lijian.Zhang@arm.com>
Signed-off-by: Jia He <justin.he@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 991e634 commit 6206b79
1 file changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
| 477 | + | |
| 478 | + | |
478 | 479 | | |
| 480 | + | |
479 | 481 | | |
480 | 482 | | |
481 | | - | |
| 483 | + | |
| 484 | + | |
482 | 485 | | |
483 | | - | |
| 486 | + | |
484 | 487 | | |
| 488 | + | |
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
| |||
498 | 502 | | |
499 | 503 | | |
500 | 504 | | |
| 505 | + | |
| 506 | + | |
501 | 507 | | |
502 | 508 | | |
503 | 509 | | |
| |||
524 | 530 | | |
525 | 531 | | |
526 | 532 | | |
527 | | - | |
| 533 | + | |
| 534 | + | |
528 | 535 | | |
| 536 | + | |
529 | 537 | | |
530 | 538 | | |
531 | | - | |
| 539 | + | |
| 540 | + | |
532 | 541 | | |
533 | | - | |
| 542 | + | |
534 | 543 | | |
| 544 | + | |
535 | 545 | | |
536 | 546 | | |
537 | 547 | | |
| |||
554 | 564 | | |
555 | 565 | | |
556 | 566 | | |
| 567 | + | |
557 | 568 | | |
558 | 569 | | |
559 | 570 | | |
| |||
0 commit comments