[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358446932-7238-1-git-send-email-stef.van.os@prodrive.nl>
Date: Thu, 17 Jan 2013 19:22:12 +0100
From: Stef van Os <stef.van.os@...drive.nl>
To: <dwmw2@...radead.org>, <artem.bityutskiy@...ux.intel.com>,
<wfp5p@...ginia.edu>, <gregkh@...uxfoundation.org>, <sr@...x.de>,
<plagnioj@...osoft.com>
CC: <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
Stef van Os <stef.van.os@...drive.nl>
Subject: [PATCH 1/1] mtd: physmap_of: fix illegal dereference
d68cbdd introduced a new way of getting the name of an mtd
partion. The character pointer is not initialized, and only
checked against NULL, not at other random garbage.
This patch fixes the resulting panic.
Signed-off-by: Stef van Os <stef.van.os@...drive.nl>
---
drivers/mtd/maps/physmap_of.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 67cc73c..7901d72 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -170,7 +170,7 @@ static int of_flash_probe(struct platform_device *dev)
resource_size_t res_size;
struct mtd_part_parser_data ppdata;
bool map_indirect;
- const char *mtd_name;
+ const char *mtd_name = NULL;
match = of_match_device(of_flash_match, &dev->dev);
if (!match)
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists