From: Stef van Os <stef.van.os@prodrive.nl>
To: <dwmw2@infradead.org>, <artem.bityutskiy@linux.intel.com>,
<wfp5p@virginia.edu>, <gregkh@linuxfoundation.org>, <sr@denx.de>,
<plagnioj@jcrosoft.com>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
Stef van Os <stef.van.os@prodrive.nl>
Subject: [PATCH 1/1] mtd: physmap_of: fix illegal dereference
Date: Thu, 17 Jan 2013 19:22:12 +0100 [thread overview]
Message-ID: <1358446932-7238-1-git-send-email-stef.van.os@prodrive.nl> (raw)
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@prodrive.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
next reply other threads:[~2013-01-17 18:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 18:22 Stef van Os [this message]
2013-02-01 16:54 ` Artem Bityutskiy
2013-02-01 17:10 ` Stef van Os
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358446932-7238-1-git-send-email-stef.van.os@prodrive.nl \
--to=stef.van.os@prodrive.nl \
--cc=artem.bityutskiy@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
--cc=sr@denx.de \
--cc=wfp5p@virginia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®