kernel-ark/drivers/mtd
H Hartley Sweeten 4b56ffcace mtd: Fix kernel NULL pointer dereference in physmap.c
During the probe for physmap platform flash devices there are a
number error exit conditions that all do a goto err_out which
then calls physmap_flash_remove().  In that function one of the
cleanup steps is:

#ifdef CONFIG_MTD_CONCAT
	if (info->cmtd != info->mtd[0])
		mtd_concat_destroy(info->cmtd);
#endif

This test will succeed since info->cmtd == NULL and info->mtd[0] is
valid.

Fix this by exiting the remove function when info->cmtd == NULL.

Also, cleanup the #ifdef CONFIG_MTD_PARTITIONS stuff by using
mtd_has_partitions().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-10-20 09:36:04 +09:00
..
chips mtd: jedec_probe: add PSD4256G6V id 2009-09-23 00:07:00 -07:00
devices mtd: fix memory leak in mtd_dataflash 2009-10-17 15:41:11 +01:00
lpddr [MTD] [LPDDR] qinfo_probe depends on lpddr 2009-01-11 10:42:32 +00:00
maps mtd: Fix kernel NULL pointer dereference in physmap.c 2009-10-20 09:36:04 +09:00
nand mtd: plat_nand: request memory resource before doing ioremap 2009-10-20 09:09:59 +09:00
onenand mtd: make onenand_base.c compile again 2009-10-05 08:30:04 +01:00
tests mtd: cleanup mtd_oobtest 2009-10-17 15:39:48 +01:00
ubi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-09-22 07:51:45 -07:00
afs.c mtd: afs: fix build warning 2009-09-04 09:38:14 +01:00
ar7part.c [MTD] mtdpart: Make all partition parsers return allocated array 2009-03-20 18:55:17 +00:00
cmdlinepart.c mtd: cmdlineparts: Use 64-bit format when printing a debug message. 2009-06-25 08:18:12 +01:00
ftl.c trivial: mtd: add __init/__exit macros to init/exitfunctions 2009-09-21 15:14:53 +02:00
inftlcore.c mtd: inftl: fix fold chain block number 2009-09-19 14:17:35 -07:00
inftlmount.c [MTD] we don't need no misc devices 2009-03-20 13:16:26 +00:00
internal.h NOMMU: Present backing device capabilities for MTD chardevs 2009-03-24 09:00:19 +00:00
Kconfig mtd: fix order of TEST/PARTITIONS kconfig options 2009-09-19 11:53:31 -07:00
Makefile NOMMU: Present backing device capabilities for MTD chardevs 2009-03-24 09:00:19 +00:00
mtd_blkdevs.c const: make block_device_operations const 2009-09-22 07:17:25 -07:00
mtdbdi.c NOMMU: Present backing device capabilities for MTD chardevs 2009-03-24 09:00:19 +00:00
mtdblock_ro.c
mtdblock.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-09-20 05:55:36 -07:00
mtdchar.c mtd: Fix pointer handling in compat ioctls to use compat_ptr() 2009-05-29 16:09:08 +01:00
mtdconcat.c mtd: mtdconcat: prevent a read from eraseregions[-1] 2009-09-19 11:18:46 -07:00
mtdcore.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-09-20 05:55:36 -07:00
mtdcore.h
mtdoops.c [MTD] mtdoops: fix a bit of spin lock usage 2009-03-20 18:39:25 +00:00
mtdpart.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-09-20 05:55:36 -07:00
mtdsuper.c Convert obvious places to deactivate_locked_super() 2009-05-09 10:49:40 -04:00
nftlcore.c mtd: nftl: fix offset alignments 2009-09-03 14:59:16 +01:00
nftlmount.c [MTD] update internal API to support 64-bit device size 2008-12-10 13:37:21 +00:00
ofpart.c mtd: ofpart: Check availability of reg property instead of name property 2009-09-19 14:14:48 -07:00
redboot.c
rfd_ftl.c [MTD] remove private wrapper of endian helpers in rfd_ftl.c 2008-12-10 15:39:09 +00:00
ssfdc.c [MTD] update internal API to support 64-bit device size 2008-12-10 13:37:21 +00:00