mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
powerpc/eeh: Fix null deref for devices removed during EEH
[ Upstream commit bcbe373053 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
16e4657a1d
commit
bd2a7e53cd
@@ -281,6 +281,10 @@ static void eeh_pe_report_edev(struct eeh_dev *edev, eeh_report_fn fn,
|
||||
struct pci_driver *driver;
|
||||
enum pci_ers_result new_result;
|
||||
|
||||
if (!edev->pdev) {
|
||||
eeh_edev_info(edev, "no device");
|
||||
return;
|
||||
}
|
||||
device_lock(&edev->pdev->dev);
|
||||
if (eeh_edev_actionable(edev)) {
|
||||
driver = eeh_pcid_get(edev->pdev);
|
||||
|
||||
Reference in New Issue
Block a user