* [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux, mtd-name
@ 2012-12-23 11:10 Baruch Siach
[not found] ` <df9da712b775781366ae23aac28ed20849b4e4d3.1356260943.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2012-12-23 11:10 UTC (permalink / raw)
To: linux-mtd
Cc: devicetree-discuss, Jean-Christophe PLAGNIOL-VILLARD,
Baruch Siach
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)
--
1.7.10.4
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux,mtd-name
[not found] ` <df9da712b775781366ae23aac28ed20849b4e4d3.1356260943.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
@ 2013-01-24 9:05 ` Baruch Siach
[not found] ` <20130124090547.GB7697-MwjkAAnuF3khR1HGirfZ1z4kX+cae0hd@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2013-01-24 9:05 UTC (permalink / raw)
To: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Artem Bityutskiy,
David Woodhouse
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
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-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
> ---
> 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-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux,mtd-name
[not found] ` <20130124090547.GB7697-MwjkAAnuF3khR1HGirfZ1z4kX+cae0hd@public.gmane.org>
@ 2013-01-28 16:02 ` Artem Bityutskiy
2013-01-28 16:12 ` Artem Bityutskiy
1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2013-01-28 16:02 UTC (permalink / raw)
To: Baruch Siach
Cc: David Woodhouse, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
[-- Attachment #1.1: Type: text/plain, Size: 1632 bytes --]
I pinged dwmw2 about this already. This is his call to merge the driver.
I will ping him again.
On Thu, 2013-01-24 at 11:05 +0200, Baruch Siach wrote:
> 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-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
> > ---
> > 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)
>
--
Best Regards,
Artem Bityutskiy
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux,mtd-name
[not found] ` <20130124090547.GB7697-MwjkAAnuF3khR1HGirfZ1z4kX+cae0hd@public.gmane.org>
2013-01-28 16:02 ` Artem Bityutskiy
@ 2013-01-28 16:12 ` Artem Bityutskiy
1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2013-01-28 16:12 UTC (permalink / raw)
To: Baruch Siach
Cc: David Woodhouse, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
[-- Attachment #1.1: Type: text/plain, Size: 261 bytes --]
On Thu, 2013-01-24 at 11:05 +0200, Baruch Siach wrote:
> Hi linux-mtd, Artem, David,
>
> Ping?
>
> It's been a month, and this is a simple uninitialized pointer dereference bug
> fix.
It is in linux-mtd now.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-28 16:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-23 11:10 [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux, mtd-name Baruch Siach
[not found] ` <df9da712b775781366ae23aac28ed20849b4e4d3.1356260943.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2013-01-24 9:05 ` [PATCH] mtd: physmap_of: fix cmdline partition method w/o linux,mtd-name Baruch Siach
[not found] ` <20130124090547.GB7697-MwjkAAnuF3khR1HGirfZ1z4kX+cae0hd@public.gmane.org>
2013-01-28 16:02 ` Artem Bityutskiy
2013-01-28 16:12 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).