diff options
| author | Ilpo Järvinen <[email protected]> | 2025-05-11 21:52:23 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2025-06-02 14:31:53 +0000 |
| commit | af6e3defb11a1c67cd462485655b43b5d70524b1 (patch) | |
| tree | a91359de83ce910faedd1fb22e527733d65a1da8 /drivers/pci/controller/pci-host-generic.c | |
| parent | PCI: Remove unused pci_printk() (diff) | |
| download | kernel-af6e3defb11a1c67cd462485655b43b5d70524b1.tar.gz kernel-af6e3defb11a1c67cd462485655b43b5d70524b1.zip | |
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]
Diffstat (limited to 'drivers/pci/controller/pci-host-generic.c')
0 files changed, 0 insertions, 0 deletions
