forked from luck/tmp_suning_uos_patched
eae95da7fc
commit 706657b1febf446a9ba37dc51b89f46604f57ee9 upstream. In order to setup its PCI component, the driver needs any node private instance in order to get a reference to the PCI device and hand that into edac_pci_create_generic_ctl(). For convenience, it uses the 0th memory controller descriptor under the assumption that if any, the 0th will be always present. However, this assumption goes wrong when the 0th node doesn't have memory and the driver doesn't initialize an instance for it: EDAC amd64: F17h detected (node 0). ... EDAC amd64: Node 0: No DIMMs detected. But looking up node instances is not really needed - all one needs is the pointer to the proper device which gets discovered during instance init. So stash that pointer into a variable and use it when setting up the EDAC PCI component. Clear that variable when the driver needs to unwind due to some instances failing init to avoid any registration imbalance. Cc: <stable@vger.kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20201122150815.13808-1-bp@alien8.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
al_mc_edac.c | ||
altera_edac.c | ||
altera_edac.h | ||
amd64_edac_dbg.c | ||
amd64_edac_inj.c | ||
amd64_edac.c | ||
amd64_edac.h | ||
amd76x_edac.c | ||
amd8111_edac.c | ||
amd8111_edac.h | ||
amd8131_edac.c | ||
amd8131_edac.h | ||
armada_xp_edac.c | ||
aspeed_edac.c | ||
bluefield_edac.c | ||
cell_edac.c | ||
cpc925_edac.c | ||
debugfs.c | ||
dmc520_edac.c | ||
e7xxx_edac.c | ||
e752x_edac.c | ||
edac_device_sysfs.c | ||
edac_device.c | ||
edac_device.h | ||
edac_mc_sysfs.c | ||
edac_mc.c | ||
edac_mc.h | ||
edac_module.c | ||
edac_module.h | ||
edac_pci_sysfs.c | ||
edac_pci.c | ||
edac_pci.h | ||
fsl_ddr_edac.c | ||
fsl_ddr_edac.h | ||
ghes_edac.c | ||
highbank_l2_edac.c | ||
highbank_mc_edac.c | ||
i7core_edac.c | ||
i10nm_base.c | ||
i3000_edac.c | ||
i3200_edac.c | ||
i5000_edac.c | ||
i5100_edac.c | ||
i5400_edac.c | ||
i7300_edac.c | ||
i82443bxgx_edac.c | ||
i82860_edac.c | ||
i82875p_edac.c | ||
i82975x_edac.c | ||
ie31200_edac.c | ||
Kconfig | ||
layerscape_edac.c | ||
Makefile | ||
mce_amd.c | ||
mce_amd.h | ||
mpc85xx_edac.c | ||
mpc85xx_edac.h | ||
mv64x60_edac.c | ||
mv64x60_edac.h | ||
octeon_edac-l2c.c | ||
octeon_edac-lmc.c | ||
octeon_edac-pc.c | ||
octeon_edac-pci.c | ||
pasemi_edac.c | ||
pnd2_edac.c | ||
pnd2_edac.h | ||
ppc4xx_edac.c | ||
ppc4xx_edac.h | ||
qcom_edac.c | ||
r82600_edac.c | ||
sb_edac.c | ||
sifive_edac.c | ||
skx_base.c | ||
skx_common.c | ||
skx_common.h | ||
synopsys_edac.c | ||
thunderx_edac.c | ||
ti_edac.c | ||
wq.c | ||
x38_edac.c | ||
xgene_edac.c |