1
0
Files
linux/drivers
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
..
2009-09-22 07:17:27 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:41 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:29 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:29 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:44 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 22:26:32 +09:30
2009-09-23 10:07:49 -07:00