linux/drivers/pci
Bjorn Helgaas 6e347b5e05 PCI: iproc: Save host bridge window resource in struct iproc_pcie
The host bridge memory window resource is inserted into the iomem_resource
tree and cannot be deallocated until the host bridge itself is removed.

Previously, the window was on the stack, which meant the iomem_resource
entry pointed into the stack and was corrupted as soon as the probe
function returned, which caused memory corruption and errors like this:

  pcie_iproc_bcma bcma0:8: resource collision: [mem 0x40000000-0x47ffffff] conflicts with PCIe MEM space [mem 0x40000000-0x47ffffff]

Move the memory window resource from the stack into struct iproc_pcie so
its lifetime matches that of the host bridge.

Fixes: c3245a5664 ("PCI: iproc: Request host bridge window resources")
Reported-and-tested-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: stable@vger.kernel.org	# v4.8+
2017-03-09 11:27:07 -06:00
..
dwc PCI: exynos: Initialize elbi_base even when using PHY framework 2017-03-07 12:46:38 -06:00
host PCI: iproc: Save host bridge window resource in struct iproc_pcie 2017-03-09 11:27:07 -06:00
hotplug sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
pcie PCI/ASPM: Always set link->downstream to avoid NULL dereference on remove 2017-03-07 14:23:30 -06:00
Kconfig PCI: Move DesignWare IP support to new drivers/pci/dwc/ directory 2017-02-21 14:59:53 -06:00
Makefile PCI: dwc: Remove dependency of designware on CONFIG_PCI 2017-02-21 15:00:26 -06:00
access.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
ecam.c PCI: Add MCFG quirks for Qualcomm QDF2432 host controller 2016-12-06 13:45:49 -06:00
host-bridge.c cxl: use pcibios_free_controller_deferred() when removing vPHBs 2016-08-22 11:09:33 +10:00
hotplug-pci.c PCI: Remove unnecessary __ref annotations 2014-04-29 17:36:44 -06:00
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c PCI: Lock each enable/disable num_vfs operation in sysfs 2017-02-03 13:42:38 -06:00
irq.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
msi.c PCI: add an API to get node from vector 2017-03-02 08:56:04 -07:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c Merge branch 'pci/pm' into next 2016-12-12 11:25:04 -06:00
pci-driver.c pci-v4.11-changes 2017-02-23 11:53:22 -08:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-mid.c pci-v4.10-changes 2016-12-15 12:46:48 -08:00
pci-stub.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pci-sysfs.c PCI: Lock each enable/disable num_vfs operation in sysfs 2017-02-03 13:42:38 -06:00
pci.c Revert "PCI: pciehp: Add runtime PM support for PCIe hotplug ports" 2017-02-03 08:53:51 -06:00
pci.h PCI: Lock each enable/disable num_vfs operation in sysfs 2017-02-03 13:42:38 -06:00
probe.c pci-v4.11-changes 2017-02-23 11:53:22 -08:00
proc.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
quirks.c PCI: Prevent VPD access for QLogic ISP2722 2017-03-07 14:16:57 -06:00
remove.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
rom.c PCI: Add comments about ROM BAR updating 2016-11-29 18:05:09 -06:00
search.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
setup-bus.c PCI: Remove res_to_dev_res() debug message 2016-12-29 11:27:52 -06:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c Merge branch 'pci/host-rockchip' into next 2016-12-12 11:25:11 -06:00
slot.c locking/atomic, kref: Add kref_read() 2017-01-14 11:37:18 +01:00
syscall.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
vc.c PCI: Fix unaligned accesses in VC code 2016-06-20 13:24:20 -05:00
vpd.c
xen-pcifront.c xen: make use of xenbus_read_unsigned() in xen-pcifront 2016-11-07 13:55:26 +01:00