linux/arch/powerpc
Andrew Donnellan 1344f5b6cb powerpc/eeh: Fix deadlock when PE frozen state can't be cleared
commit 409bf7f8a0 upstream.

In eeh_reset_device(), we take the pci_rescan_remove_lock immediately after
after we call eeh_reset_pe() to reset the PCI controller. We then call
eeh_clear_pe_frozen_state(), which can return an error. In this case, we
bail out of eeh_reset_device() without calling pci_unlock_rescan_remove().

Add a call to pci_unlock_rescan_remove() in the eeh_clear_pe_frozen_state()
error path so that we don't cause a deadlock later on.

Reported-by: Pradipta Ghosh <pradghos@in.ibm.com>
Fixes: 7895470063 ("powerpc/eeh: Avoid I/O access during PE reset")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-02-23 03:54:41 +00:00
..
boot powerpc/boot: Specify ABI v2 when building an LE boot wrapper 2015-10-06 11:52:28 +01:00
configs powerpc: Remove platforms/wsp and associated pieces 2014-06-11 16:35:38 +10:00
crypto crypto: add missing crypto module aliases 2015-02-04 10:57:50 +00:00
include KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register 2017-02-23 03:54:05 +00:00
kernel powerpc/eeh: Fix deadlock when PE frozen state can't be cleared 2017-02-23 03:54:41 +00:00
kvm KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register 2017-02-23 03:54:05 +00:00
lib powerpc/64: Fix incorrect return value from __copy_tofrom_user 2017-02-23 03:54:11 +00:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/mm/hash64: Fix subpage protection with 4K HPTE config 2016-08-22 22:37:57 +01:00
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-01-25 10:44:05 +00:00
oprofile cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE} 2014-03-19 14:10:24 +01:00
perf powerpc/perf: Remove PPMU_HAS_SSLOT flag for Power8 2016-02-17 10:22:48 +00:00
platforms powerpc/pseries: Fix stack corruption in htpe code 2017-02-23 03:54:11 +00:00
sysdev powerpc/MSI: Fix race condition in tearing down MSI interrupts 2015-09-30 13:20:55 +01:00
xmon powerpc/xmon: Fix another endiannes issue in RTAS call from xmon 2015-02-04 10:58:05 +00:00
Kconfig powerpc/bpf/jit: Disable classic BPF JIT on ppc64le 2016-08-22 22:38:18 +01:00
Kconfig.debug powerpc/powernv: Remove OPAL v1 takeover 2014-06-25 13:10:47 +10:00
Makefile Merge branch 'merge' into next 2014-05-28 13:30:12 +10:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00