Re: [PATCH v5 05/12] powerpc/eeh: EEH for pSeries hot plug
From: Nathan Lynch <hidden>
Date: 2019-09-23 18:04:12
From: Nathan Lynch <hidden>
Date: 2019-09-23 18:04:12
Sam Bobroff [off-list ref] writes:
Thanks, this does look like a bug to me. I couldn't replicate your crash (even with CONFIG_SLUB_DEBUG_ON) but I think I do see a bug there. Does the below patch also fix it for you?
Yes, this works as well, thanks.
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 0a91dee51245..f8aa65cb2931 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c@@ -1207,10 +1207,11 @@ void eeh_add_device_late(struct pci_dev *dev) if (eeh_has_flag(EEH_PROBE_MODE_DEV)) eeh_ops->probe(pdn, NULL); - edev->pdev = dev; - dev->dev.archdata.edev = edev; - - eeh_addr_cache_insert_dev(dev); + if (eeh_enabled()) { + edev->pdev = dev; + dev->dev.archdata.edev = edev; + eeh_addr_cache_insert_dev(dev); + } } /**