summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-10-02 17:08:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-11 18:21:30 +0300
commit6213c714a580c34751f9501725369fc5e0fe71e5 (patch)
tree291677445fb4ee9742349a2ad28ef629fd63778a /Makefile
parentf750e1518e9bb08626ae31d4ad9c0333878fcaa7 (diff)
downloadlinux-6213c714a580c34751f9501725369fc5e0fe71e5.tar.xz
PCI/ASPM: Deal with missing root ports in link state handling
commit ee8bdfb6568d86bb93f55f8d99c4c643e77304ee upstream. Even though it is unconventional, some PCIe host implementations omit the root ports entirely, and simply consist of a host bridge (which is not modeled as a device in the PCI hierarchy) and a link. When the downstream device is an endpoint, our current code does not seem to mind this unusual configuration. However, when PCIe switches are involved, the ASPM code assumes that any downstream switch port has a parent, and blindly dereferences the bus->parent->self field of the pci_dev struct to chain the downstream link state to the link state of the root port. Given that the root port is missing, the link is not modeled at all, and nor is the link state, and attempting to access it results in a NULL pointer dereference and a crash. Avoid this by allowing the link state chain to terminate at the downstream port if no root port exists. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions