Revision bd91b56cb3b27492963caeb5fccefe20a986ca8d authored by Thomas Tai on 26 July 2018, 17:13:04 UTC, committed by Bjorn Helgaas on 26 July 2018, 17:13:04 UTC
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: 7e9084b36740 ("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>
1 parent 270ed73
History
File Mode Size
mei
ad525x_dpot.txt -rw-r--r-- 1.6 KB
apds990x.txt -rw-r--r-- 3.5 KB
bh1770glc.txt -rw-r--r-- 3.5 KB
c2port.txt -rw-r--r-- 2.8 KB
eeprom -rw-r--r-- 4.1 KB
ibmvmc.rst -rw-r--r-- 9.8 KB
ics932s401 -rw-r--r-- 1016 bytes
isl29003 -rw-r--r-- 1.5 KB
lis3lv02d -rw-r--r-- 4.2 KB
max6875 -rw-r--r-- 3.0 KB
pci-endpoint-test.txt -rw-r--r-- 1.2 KB
spear-pcie-gadget.txt -rw-r--r-- 3.9 KB

back to top