Commit f05a0d8
scsi: hisi_sas: Free irq vectors in order for v3 HW
[ Upstream commit 554fb72 ]
If the driver probe fails to request the channel IRQ or fatal IRQ, the
driver will free the IRQ vectors before freeing the IRQs in free_irq(),
and this will cause a kernel BUG like this:
------------[ cut here ]------------
kernel BUG at drivers/pci/msi.c:369!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Call trace:
free_msi_irqs+0x118/0x13c
pci_disable_msi+0xfc/0x120
pci_free_irq_vectors+0x24/0x3c
hisi_sas_v3_probe+0x360/0x9d0 [hisi_sas_v3_hw]
local_pci_probe+0x44/0xb0
work_for_cpu_fn+0x20/0x34
process_one_work+0x1d0/0x340
worker_thread+0x2e0/0x460
kthread+0x180/0x190
ret_from_fork+0x10/0x20
---[ end trace b88990335b610c11 ]---
So we use devm_add_action() to control the order in which we free the
vectors.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Qi Liu <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent b8fa10d commit f05a0d8
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2392 | 2392 | | |
2393 | 2393 | | |
2394 | 2394 | | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
2395 | 2402 | | |
2396 | 2403 | | |
2397 | 2404 | | |
2398 | 2405 | | |
2399 | 2406 | | |
| 2407 | + | |
2400 | 2408 | | |
2401 | 2409 | | |
2402 | 2410 | | |
2403 | 2411 | | |
2404 | 2412 | | |
2405 | | - | |
| 2413 | + | |
2406 | 2414 | | |
2407 | 2415 | | |
2408 | 2416 | | |
| |||
2414 | 2422 | | |
2415 | 2423 | | |
2416 | 2424 | | |
| 2425 | + | |
2417 | 2426 | | |
2418 | 2427 | | |
2419 | 2428 | | |
| |||
4763 | 4772 | | |
4764 | 4773 | | |
4765 | 4774 | | |
4766 | | - | |
| 4775 | + | |
4767 | 4776 | | |
4768 | 4777 | | |
4769 | 4778 | | |
| |||
4792 | 4801 | | |
4793 | 4802 | | |
4794 | 4803 | | |
4795 | | - | |
4796 | | - | |
4797 | 4804 | | |
4798 | 4805 | | |
4799 | 4806 | | |
| |||
4821 | 4828 | | |
4822 | 4829 | | |
4823 | 4830 | | |
4824 | | - | |
4825 | 4831 | | |
4826 | 4832 | | |
4827 | 4833 | | |
| |||
0 commit comments