Commit afe8e65
Myron Stowe
PCI: WARN (not BUG()) when we fail to assign optional resources
JIRA: https://issues.redhat.com/browse/RHEL-107597
Upstream Status: af6e3de
commit af6e3de
Author: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Date: Mon May 12 00:52:23 2025 +0300
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 <tudor.ambarus@linaro.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/linux-pci/5f103643-5e1c-43c6-b8fe-9617d3b5447c@linaro.org
Link: https://lore.kernel.org/r/20250511215223.7131-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Myron Stowe <mstowe@redhat.com>1 parent aa762ff commit afe8e65
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2302 | 2302 | | |
2303 | 2303 | | |
2304 | 2304 | | |
2305 | | - | |
2306 | | - | |
| 2305 | + | |
| 2306 | + | |
2307 | 2307 | | |
2308 | 2308 | | |
2309 | 2309 | | |
| |||
2365 | 2365 | | |
2366 | 2366 | | |
2367 | 2367 | | |
2368 | | - | |
| 2368 | + | |
| 2369 | + | |
2369 | 2370 | | |
2370 | 2371 | | |
2371 | 2372 | | |
| |||
2441 | 2442 | | |
2442 | 2443 | | |
2443 | 2444 | | |
2444 | | - | |
| 2445 | + | |
| 2446 | + | |
2445 | 2447 | | |
2446 | 2448 | | |
2447 | 2449 | | |
| |||
2497 | 2499 | | |
2498 | 2500 | | |
2499 | 2501 | | |
2500 | | - | |
| 2502 | + | |
| 2503 | + | |
2501 | 2504 | | |
2502 | 2505 | | |
0 commit comments