linux/drivers/mtd
Atsushi Nemoto d58ab5cf09 mtd: physmap: fix NULL pointer dereference in error path
commit e480814f13 ("[MTD] [MAPS] physmap:
fix wrong free and del_mtd_{partition,device}") introduces a NULL pointer
dereference in physmap_flash_remove when called from the error path in
physmap_flash_probe (if map_probe failed).

Call del_mtd_{partition,device} only if info->cmtd was not NULL.

Reported-by: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-10 15:55:11 -07:00
..
chips [MTD] map_rom has NULL erase pointer 2009-01-11 19:56:46 +00:00
devices mtd_dataflash: fix probing of AT45DB321C chips. 2009-03-10 15:55:11 -07:00
lpddr [MTD] [LPDDR] qinfo_probe depends on lpddr 2009-01-11 10:42:32 +00:00
maps mtd: physmap: fix NULL pointer dereference in error path 2009-03-10 15:55:11 -07:00
nand [ARM] fix lots of ARM __devexit sillyness 2009-03-03 21:04:04 +00:00
onenand ARM: OMAP: Fix gpio by switching to generic gpio calls, v2 2009-01-15 13:09:52 +02:00
tests [MTD] [TESTS] Fix some size_t printk format warnings 2009-01-05 16:31:03 +00:00
ubi UBI: allow direct user-space I/O 2009-01-27 16:54:41 +02:00
afs.c
ar7part.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
Kconfig Merge branch 'master' of git://git.infradead.org/users/dedekind/mtd-tests-2.6 2009-01-05 16:24:55 +00:00
Makefile Merge branch 'master' of git://git.infradead.org/users/dedekind/mtd-tests-2.6 2009-01-05 16:24:55 +00:00
mtd_blkdevs.c
mtdblock_ro.c
mtdblock.c
mtdchar.c
mtdconcat.c mtd: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:38 -08:00
mtdcore.c
mtdcore.h
mtdoops.c
mtdpart.c
mtdsuper.c
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
ssfdc.c