diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-05-12 00:52:23 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2025-06-02 09:31:53 -0500 |
commit | af6e3defb11a1c67cd462485655b43b5d70524b1 (patch) | |
tree | a91359de83ce910faedd1fb22e527733d65a1da8 /tools/perf/scripts/python | |
parent | 1c8a0ed2043c30cee97facd1eb8cff88b6c7ea4a (diff) |
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
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions