powerpc/eeh: Fix null deref for devices removed during EEH
authorSam Bobroff <sbobroff@linux.ibm.com>
Wed, 12 Sep 2018 01:23:21 +0000 (11:23 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 13 Oct 2018 11:21:25 +0000 (22:21 +1100)
commitbcbe3730531239abd45ab6c6af4a18078b37dd47
treef52e4a7cd0c3035c7628e779917390cfdd55bff3
parentf9bc28aedfb5bbd572d2d365f3095c1becd7209b
powerpc/eeh: Fix null deref for devices removed during EEH

If a device is removed during EEH processing (either by a driver's
handler or as part of recovery), it can lead to a null dereference
in eeh_pe_report_edev().

To handle this, skip devices that have been removed.

Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh_driver.c