linux-stable/drivers/pci/pcie
Thomas Tai bd91b56cb3 PCI/AER: Work around use-after-free in pcie_do_fatal_recovery()
When an fatal error is received by a non-bridge device, the device is
removed, and pci_stop_and_remove_bus_device() deallocates the device
structure.  The freed device structure is used by subsequent code to send
uevents and print messages.

Hold a reference on the device until we're finished using it.  This is not
an ideal fix because pcie_do_fatal_recovery() should not use the device at
all after removing it, but that's too big a project for right now.

Fixes: 7e9084b367 ("PCI/AER: Handle ERR_FATAL with removal and re-enumeration of devices")
Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
[bhelgaas: changelog, reduce get/put coverage]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2018-07-26 12:13:04 -05:00
..
aer.c PCI/AER: Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/ 2018-06-11 08:11:39 -05:00
aer_inject.c PCI/AER: Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/ 2018-06-11 08:11:39 -05:00
aspm.c PCI/ASPM: Disable ASPM L1.2 Substate if we don't have LTR 2018-04-18 16:10:34 -05:00
dpc.c PCI/AER: Move pcie_aer_get_firmware_first() to portdrv.h 2018-06-11 08:11:11 -05:00
err.c PCI/AER: Work around use-after-free in pcie_do_fatal_recovery() 2018-07-26 12:13:04 -05:00
Kconfig PCI/AER: Use "PCI Express" consistently in Kconfig text 2018-06-11 08:11:47 -05:00
Makefile PCI/AER: Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/ 2018-06-11 08:11:39 -05:00
pme.c PCI/portdrv: Merge pcieport_if.h into portdrv.h 2018-03-09 11:42:01 -06:00
portdrv.h PCI/AER: Move aer_irq() declaration to portdrv.h 2018-06-11 08:11:18 -05:00
portdrv_core.c Merge branch 'pci/hotplug' 2018-06-06 16:10:10 -05:00
portdrv_pci.c Merge branch 'pci/portdrv' 2018-04-04 13:27:58 -05:00
ptm.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00