Commit af6e3de
PCI: WARN (not BUG()) when we fail to assign optional resources
Resource fitting/assignment code checks if there's a remainder in
add_list (aka. realloc_head in the inner functions) using BUG_ON().
This problem typically results in a mere PCI device resource assignment
failure which does not warrant using BUG_ON(). The machine could well
come up usable even if this condition occurs because the realloc_head
relates to resources which are optional anyway.
Change BUG_ON() to WARN_ON_ONCE() and free the list if it's not empty.
[bhelgaas: subject]
Reported-by: Tudor Ambarus <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Krzysztof Wilczyński <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Link: https://lore.kernel.org/linux-pci/[email protected]
Link: https://lore.kernel.org/r/[email protected]1 parent 1c8a0ed commit af6e3de
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2298 | 2298 | | |
2299 | 2299 | | |
2300 | 2300 | | |
2301 | | - | |
2302 | | - | |
| 2301 | + | |
| 2302 | + | |
2303 | 2303 | | |
2304 | 2304 | | |
2305 | 2305 | | |
| |||
2361 | 2361 | | |
2362 | 2362 | | |
2363 | 2363 | | |
2364 | | - | |
| 2364 | + | |
| 2365 | + | |
2365 | 2366 | | |
2366 | 2367 | | |
2367 | 2368 | | |
| |||
2437 | 2438 | | |
2438 | 2439 | | |
2439 | 2440 | | |
2440 | | - | |
| 2441 | + | |
| 2442 | + | |
2441 | 2443 | | |
2442 | 2444 | | |
2443 | 2445 | | |
| |||
2493 | 2495 | | |
2494 | 2496 | | |
2495 | 2497 | | |
2496 | | - | |
| 2498 | + | |
| 2499 | + | |
2497 | 2500 | | |
2498 | 2501 | | |
0 commit comments