]> Git Repo - linux.git/commit
PCI: Don't scan random busses in pci_scan_bridge()
authorAndreas Noever <[email protected]>
Thu, 23 Jan 2014 20:59:28 +0000 (21:59 +0100)
committerBjorn Helgaas <[email protected]>
Tue, 11 Feb 2014 22:21:08 +0000 (15:21 -0700)
commitfc1b253141b360f9c669d391b4ff663b984ef0c9
tree340f103d698872c8ebbeb4712a7e512936bc4a68
parentc95b0bd6ca3dbb1abf8394c38d26df65d890cb9a
PCI: Don't scan random busses in pci_scan_bridge()

When assigning a new bus number in pci_scan_bridge we check whether
max+1 is free by calling pci_find_bus. If it does already exist then we
assume that we are rescanning and that this is the right bus to scan.

This is fragile. If max+1 lies outside of bus->busn_res.end then we will
rescan some random bus from somewhere else in the hierachy. This patch
checks for this case and prints a warning.

[bhelgaas: add parent/child bus number info to dev_warn()]
Signed-off-by: Andreas Noever <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
drivers/pci/probe.c
This page took 0.047856 seconds and 4 git commands to generate.