From: Baruch Siach <baruch@tkos.co.il>
To: linux-mtd@lists.infradead.org,
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
David Woodhouse <dwmw2@infradead.org>
Cc: devicetree-discuss@lists.ozlabs.org,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Subject: Re: [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux,mtd-name
Date: Thu, 24 Jan 2013 11:05:47 +0200 [thread overview]
Message-ID: <20130124090547.GB7697@sapphire.tkos.co.il> (raw)
In-Reply-To: <df9da712b775781366ae23aac28ed20849b4e4d3.1356260943.git.baruch@tkos.co.il>
Hi linux-mtd, Artem, David,
Ping?
It's been a month, and this is a simple uninitialized pointer dereference bug
fix.
baruch
On Sun, Dec 23, 2012 at 01:10:50PM +0200, Baruch Siach wrote:
> Commit d68cbdd4fb (mtd: physmap_of: allow to specify the mtd name for retro
> compatiblity) broke cmdline partitioning using dev_name() in the kernel command
> line. of_property_read_string() does not touch mtd_name when linux,mtd-name is
> not present in the device tree, which causes map.name to be set to a random
> value. Fix this by initializing mtd_name to NULL.
>
> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> drivers/mtd/maps/physmap_of.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
> index 37cdc20..6fb2bd8 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)
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
next prev parent reply other threads:[~2013-01-24 9:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-23 11:10 [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux, mtd-name Baruch Siach
2013-01-24 9:05 ` Baruch Siach [this message]
2013-01-28 16:02 ` [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux,mtd-name Artem Bityutskiy
2013-01-28 16:12 ` Artem Bityutskiy
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=20130124090547.GB7697@sapphire.tkos.co.il \
--to=baruch@tkos.co.il \
--cc=artem.bityutskiy@linux.intel.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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