linux/drivers/mtd/nand
Josh Wu a749d13acd mtd: atmel_nand: fix bug driver will in a dead lock if no nand detected
In the atmel driver probe function, the code shows like following:
  atmel_nand_probe(...) {
        ...

  err_nand_ioremap:
        platform_driver_unregister(&atmel_nand_nfc_driver);
        return res;
  }

If no nand flash detected, the driver probe function will goto
err_nand_ioremap label.
Then platform_driver_unregister() will be called. It will get the
lock of atmel_nand device since it is parent of nfc_device. The
problem is the lock is already hold by atmel_nand_probe itself.
So system will be in a dead lock.

This patch just simply removed to platform_driver_unregister() call.
When atmel_nand driver is quit the platform_driver_unregister() will
be called in atmel_nand_remove().

[Brian: the NAND platform probe really has no business
 registering/unregistering another driver; this fixes the deadlock, but
 we should follow up the likely racy behavior here with a better
 architecture]

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Cc: <stable@vger.kernel.org> # 3.12
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2013-11-07 10:16:21 -08:00
..
bcm47xxnflash mtd: bcm47xxnflash: Use devm_kzalloc 2013-11-06 23:32:56 -08:00
gpmi-nand mtd: gpmi: imx6: fix the wrong method for checking ready/busy 2013-11-06 23:33:03 -08:00
ams-delta.c mtd: nand: ams-delta: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:30 +01:00
atmel_nand_ecc.h mtd: at91: atmel_nand: add Programmable Multibit ECC controller support 2012-07-06 18:23:25 +01:00
atmel_nand_nfc.h mtd: atmel_nand: add Nand Flash Controller (NFC) support 2013-08-05 21:07:41 +01:00
atmel_nand.c mtd: atmel_nand: fix bug driver will in a dead lock if no nand detected 2013-11-07 10:16:21 -08:00
au1550nd.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
bf5xx_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
cafe_nand.c mtd: nand: subpage write support for hardware based ECC schemes 2013-04-05 13:22:59 +01:00
cmx270_nand.c mtd: kill MTD_NAND_VERIFY_WRITE 2012-09-29 15:00:46 +01:00
cs553x_nand.c mtd cs553x_nand: use kzalloc() instead of memset 2013-08-30 21:52:48 +01:00
davinci_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
denali_dt.c mtd: denali_dt: Remove redundant use of of_match_ptr 2013-04-05 14:04:34 +01:00
denali_pci.c mtd: denali: remove unnecessary pci_set_drvdata() 2013-11-06 23:32:44 -08:00
denali.c mtd: nand: add a helper to check the SLC/MLC nand chip 2013-10-27 16:27:04 -07:00
denali.h mtd: denali: add a DT driver 2012-11-15 15:37:46 +02:00
diskonchip.c mtd: diskonchip: Fix incorrect placement of __initdata 2013-10-27 16:27:07 -07:00
docg4.c mtd: docg4: fix status polling loop 2013-11-06 23:32:52 -08:00
fsl_elbc_nand.c mtd: nand: remove obsolete 'ecclayout' field 2013-10-27 16:27:03 -07:00
fsl_ifc_nand.c driver/mtd/ifc: Read Status while programming NAND flash 2013-11-06 23:33:01 -08:00
fsl_upm.c Drivers: mtd: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
fsmc_nand.c mtd: fsmc_nand: simplify platform_get_resource_byname/devm_ioremap_resource 2013-08-30 21:42:20 +01:00
gpio.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
jz4740_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
Kconfig mtd: nand: omap: remove selection of BCH ecc-scheme via KConfig 2013-11-06 23:33:11 -08:00
lpc32xx_mlc.c mtd: nand: lpc32xx_mlc: Remove redundant of_match_ptr 2013-11-06 23:32:45 -08:00
lpc32xx_slc.c mtd: nand: lpc32xx_slc: Remove redundant of_match_ptr 2013-11-06 23:32:45 -08:00
Makefile mtd: remove alauda driver 2013-08-30 21:51:57 +01:00
mpc5121_nfc.c mtd: mpc5121_nfc: cleanup clock API use 2013-08-23 23:07:46 +02:00
mxc_nand.c mtd: nand: remove deprecated IRQF_DISABLED 2013-11-07 00:08:56 -08:00
nand_base.c mtd: nand: use a local variable to simplify the nand_scan_tail 2013-11-07 00:08:56 -08:00
nand_bbt.c mtd: nand_bbt: kill NAND_BBT_SCANALLPAGES 2013-11-06 23:33:14 -08:00
nand_bch.c mtd: cleanup style on pr_debug messages 2011-09-11 15:02:16 +03:00
nand_ecc.c mtd: nane: print source of error message 2013-02-04 09:27:19 +02:00
nand_ids.c mtd: add the ecc info for some full-id nand chips 2013-08-30 21:34:47 +01:00
nandsim.c mtd: nandsim: don't call nand_default_bbt() directly 2013-10-27 16:26:59 -07:00
ndfc.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
nuc900_nand.c mtd: nand: nuc900_nand: remove unnecessary platform_set_drvdata() 2013-08-05 20:59:09 +01:00
omap2.c mtd: nand: omap: fix error return code in omap_nand_probe() 2013-11-06 23:33:15 -08:00
orion_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
pasemi_nand.c mtd: remove use of __devexit 2012-11-22 12:07:03 +02:00
plat_nand.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
pxa3xx_nand.c mtd: nand: remove deprecated IRQF_DISABLED 2013-11-07 00:08:56 -08:00
r852.c mtd: r852: Staticize local symbols 2013-08-30 21:51:45 +01:00
r852.h mtd: r852: remove useless pci powerup/down from suspend/resume routines 2010-10-25 01:32:21 +01:00
s3c2410.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
sh_flctl.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
sharpsl.c mtd: nand: use dev_get_platdata() 2013-08-30 21:34:33 +01:00
sm_common.c mtd: nand: refactor chip->block_markbad interface 2013-08-30 16:47:52 +01:00
sm_common.h
socrates_nand.c mtd: socrates_nand: Use dev_err instead of printk 2013-11-06 23:32:51 -08:00
tmio_nand.c mtd: nand: remove deprecated IRQF_DISABLED 2013-11-07 00:08:56 -08:00
txx9ndfmc.c mtd: simplify use of devm_ioremap_resource 2013-08-30 21:36:15 +01:00
xway_nand.c mtd: lantiq: Add NAND support on Lantiq XWAY SoC. 2012-09-29 15:05:18 +01:00