diff options
| author | 2019-08-16 14:48:14 +1000 | |
|---|---|---|
| committer | 2019-08-22 23:12:47 +1000 | |
| commit | 2e25505147b8acf6510b9d5d951fd4c75f2e9bf2 (patch) | |
| tree | 6dc69c04484fb510f6ad970348d9a6c835002a86 /scripts/Makefile.thinlto | |
| parent | powerpc/eeh: Convert log messages to eeh_edev_* macros (diff) | |
powerpc/eeh: Fix crash when edev->pdev changes
If a PCI device is removed during eeh_pe_report_edev(), between the
calls to device_lock() and device_unlock(), edev->pdev will change and
cause a crash as the wrong mutex is released.
To correct this, hold the PCI rescan/remove lock while taking a copy
of edev->pdev and performing a get_device() on it. Use this value to
release the mutex, but also pass it through to the device driver's EEH
handlers so that they always see the same device.
Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/3c590579a0faa24d20c826dcd26c739eb4d454e6.1565930772.git.sbobroff@linux.ibm.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
