summaryrefslogtreecommitdiffstats
path: root/scripts/crypto
diff options
context:
space:
mode:
authorAngel J <iamanaws@httpd.dev>2026-09-18 14:55:40 -0500
committerBjorn Helgaas <bhelgaas@google.com>2026-09-18 15:19:20 -0500
commit8805840aad73df7146778be243a196d48b4f6430 (patch)
tree12c27341c693c7a4345dc2fb923dd15b41b7dc69 /scripts/crypto
parentd58384c22739848efe14b34e9586e4f1242f33c0 (diff)
downloadlinux-stable-8805840aad73df7146778be243a196d48b4f6430.tar.gz
linux-stable-8805840aad73df7146778be243a196d48b4f6430.zip
PCI: of_property: Omit bus properties without a subordinate bus
A bridge (a device with a Type 1 header) may not have a secondary bus allocated (pdev->subordinate), e.g., if there are no available bus numbers or the bridge secondary/subordinate bus numbers are not writable. The dynamic OF helpers of_pci_prop_bus_range() and of_pci_prop_intr_map() dereference pdev->subordinate without checking it. When CONFIG_PCI_DYNAMIC_OF_NODES is enabled, this can cause a NULL pointer dereference and early boot hang. Generate 'bus-range' and 'interrupt-map' properties only when a subordinate bus exists. Keep the node and its remaining properties for bridges without one. The problem was latent since 407d1a51921e ("PCI: Create device tree node for bridge"), but wasn't reachable until 1f340724419e ("PCI: of: Create device tree PCI host bridge node"), which appeared in v6.15. Before 1f340724419e, of_pci_make_dev_node() returned early because the parent OF node was missing. Fixes: 407d1a51921e ("PCI: Create device tree node for bridge") Signed-off-by: Angel J <iamanaws@httpd.dev> [bhelgaas: move pdev->subordinate test to callees, commit log] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: stable@vger.kernel.org # v6.6+ Link: https://patch.msgid.link/20260918195540.GA1187209@bhelgaas
Diffstat (limited to 'scripts/crypto')
0 files changed, 0 insertions, 0 deletions