summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/eeh.h
diff options
context:
space:
mode:
authorSam Bobroff <sbobroff@linux.ibm.com>2019-08-16 06:48:14 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2019-08-22 15:12:47 +0200
commit2e25505147b8acf6510b9d5d951fd4c75f2e9bf2 (patch)
tree6dc69c04484fb510f6ad970348d9a6c835002a86 /arch/powerpc/include/asm/eeh.h
parentpowerpc/eeh: Convert log messages to eeh_edev_* macros (diff)
downloadlinux-2e25505147b8acf6510b9d5d951fd4c75f2e9bf2.tar.xz
linux-2e25505147b8acf6510b9d5d951fd4c75f2e9bf2.zip
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 'arch/powerpc/include/asm/eeh.h')
0 files changed, 0 insertions, 0 deletions