linux/drivers/edac
Yanjiang Jin 27bda205ba EDAC, mpc85xx: Implement remove method for the platform driver
If we execute the below steps without this patch:

  modprobe mpc85xx_edac [The first insmod, everything is well.]
  modprobe -r mpc85xx_edac
  modprobe mpc85xx_edac [insmod again, error happens.]

We would get the error messages as below:

  BUG: recent printk recursion!
  Oops: Kernel access of bad area, sig: 11 [#48]
  Modules linked in: mpc85xx_edac edac_core softdog [last unloaded: mpc85xx_edac]
  CPU: 5 PID: 14773 Comm: modprobe Tainted: G D C 4.8.3-rt2
   .vsnprintf
   .vscnprintf
   .vprintk_emit
   .printk
   .edac_pci_add_device
   .mpc85xx_pci_err_probe
   .platform_drv_probe
   .driver_probe_device
   .__driver_attach
   .bus_for_each_dev
   .driver_attach
   .bus_add_driver
   .driver_register
   .__platform_register_drivers
   .mpc85xx_mc_init
   .do_one_initcall
   .do_init_module
   .load_module
   .SyS_finit_module
   system_call

Address this by cleaning up properly when removing the platform driver.

Tested on a T4240QDS board.

Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: york.sun@nxp.com
Link: http://lkml.kernel.org/r/1479351380-17109-2-git-send-email-yanjiang.jin@windriver.com
[ Boris: massage commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
2016-11-17 11:19:50 +01:00
..
altera_edac.c EDAC, altera: Disable IRQs while injecting SDRAM errors 2016-10-22 20:14:03 +02:00
altera_edac.h
amd64_edac.c
amd64_edac.h
amd64_edac_dbg.c
amd64_edac_inj.c
amd76x_edac.c
amd8111_edac.c
amd8111_edac.h
amd8131_edac.c
amd8131_edac.h
cell_edac.c
cpc925_edac.c
debugfs.c
e7xxx_edac.c
e752x_edac.c
edac_core.h
edac_device.c
edac_device_sysfs.c
edac_mc.c EDAC, mc: Fix locking around mc_devices list 2016-11-14 13:26:11 +01:00
edac_mc_sysfs.c
edac_module.c
edac_module.h
edac_pci.c
edac_pci_sysfs.c
edac_stub.c
fsl_ddr_edac.c
fsl_ddr_edac.h
ghes_edac.c
highbank_l2_edac.c
highbank_mc_edac.c
i7core_edac.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 EDAC, mpc85xx: Implement remove method for the platform driver 2016-11-17 11:19:50 +01:00
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
ppc4xx_edac.c
ppc4xx_edac.h
r82600_edac.c
sb_edac.c
skx_edac.c EDAC, skx_edac: Fix non static symbol warnings 2016-10-22 20:10:38 +02:00
synopsys_edac.c
tile_edac.c
wq.c
x38_edac.c
xgene_edac.c EDAC, xgene: Fix spelling mistake in error messages 2016-11-15 11:10:02 +01:00