remarkable-linux/drivers/pci
Ard Biesheuvel db98acd6f8 PCI/ASPM: Deal with missing root ports in link state handling
commit ee8bdfb656 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>
2018-03-08 22:41:25 -08:00
..
dwc PCI: keystone: Fix interrupt-controller-node lookup 2018-02-22 15:42:27 +01:00
endpoint PCI: endpoint: Use correct "end of test" interrupt 2017-09-20 13:56:06 -05:00
host PCI: rcar: Fix use-after-free in probe error path 2018-02-25 11:08:03 +01:00
hotplug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pcie PCI/ASPM: Deal with missing root ports in link state handling 2018-03-08 22:41:25 -08:00
switch
access.c
ats.c
bus.c
ecam.c
host-bridge.c
hotplug-pci.c
htirq.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iov.c PCI: Create SR-IOV virtfn/physfn links before attaching driver 2017-12-25 14:26:26 +01:00
irq.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmap.c
msi.c pci-v4.14-changes 2017-09-08 15:47:43 -07:00
of.c
pci-acpi.c
pci-driver.c PCI / PM: Force devices to D0 in pci_pm_thaw_noirq() 2017-12-29 17:53:47 +01:00
pci-label.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-mid.c
pci-stub.c
pci-sysfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci.c PCI: Avoid bus reset if bridge itself is broken 2017-12-25 14:26:25 +01:00
pci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
probe.c PCI: Do not allocate more buses than available in parent 2017-12-20 10:10:24 +01:00
proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quirks.c PCI/cxgb4: Extend T3 PCI quirk to T4+ devices 2018-02-28 10:19:41 +01:00
remove.c PCI: Detach driver before procfs & sysfs teardown on device remove 2017-12-20 10:10:32 +01:00
rom.c
search.c
setup-bus.c
setup-irq.c PCI: Inline and remove pcibios_update_irq() 2017-08-10 12:49:57 -05:00
setup-res.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
slot.c
syscall.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vc.c
vpd.c
xen-pcifront.c