All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mtd: physmap_of: fix illegal dereference
@ 2013-01-17 18:22 ` Stef van Os
  0 siblings, 0 replies; 6+ messages in thread
From: Stef van Os @ 2013-01-17 18:22 UTC (permalink / raw)
  To: dwmw2, artem.bityutskiy, wfp5p, gregkh, sr, plagnioj
  Cc: Stef van Os, linux-mtd, linux-kernel

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 1/1] mtd: physmap_of: fix illegal dereference
@ 2013-01-17 18:22 ` Stef van Os
  0 siblings, 0 replies; 6+ messages in thread
From: Stef van Os @ 2013-01-17 18:22 UTC (permalink / raw)
  To: dwmw2, artem.bityutskiy, wfp5p, gregkh, sr, plagnioj
  Cc: linux-mtd, linux-kernel, Stef van Os

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] mtd: physmap_of: fix illegal dereference
  2013-01-17 18:22 ` Stef van Os
@ 2013-02-01 16:54   ` Artem Bityutskiy
  -1 siblings, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2013-02-01 16:54 UTC (permalink / raw)
  To: Stef van Os; +Cc: gregkh, linux-kernel, wfp5p, linux-mtd, sr, plagnioj, dwmw2

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

On Thu, 2013-01-17 at 19:22 +0100, Stef van Os wrote:
> 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>

A similar fix already sits in the mtd tree:

http://git.infradead.org/mtd-2.6.git/commit/7dfe4be351e81656ca1068e5d4ead235c7ba94b1

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] mtd: physmap_of: fix illegal dereference
@ 2013-02-01 16:54   ` Artem Bityutskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2013-02-01 16:54 UTC (permalink / raw)
  To: Stef van Os; +Cc: dwmw2, wfp5p, gregkh, sr, plagnioj, linux-mtd, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

On Thu, 2013-01-17 at 19:22 +0100, Stef van Os wrote:
> 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>

A similar fix already sits in the mtd tree:

http://git.infradead.org/mtd-2.6.git/commit/7dfe4be351e81656ca1068e5d4ead235c7ba94b1

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] mtd: physmap_of: fix illegal dereference
  2013-02-01 16:54   ` Artem Bityutskiy
@ 2013-02-01 17:10     ` Stef van Os
  -1 siblings, 0 replies; 6+ messages in thread
From: Stef van Os @ 2013-02-01 17:10 UTC (permalink / raw)
  To: artem.bityutskiy
  Cc: gregkh, linux-kernel, wfp5p, linux-mtd, sr, plagnioj, dwmw2

On 02/01/2013 05:54 PM, Artem Bityutskiy wrote:
> On Thu, 2013-01-17 at 19:22 +0100, Stef van Os wrote:
>> 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>
> A similar fix already sits in the mtd tree:
>
> http://git.infradead.org/mtd-2.6.git/commit/7dfe4be351e81656ca1068e5d4ead235c7ba94b1
>
Ah, sorry, I wasn't aware of this. But, as long as some fix for this 
issue makes it into mainline, I'm happy :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] mtd: physmap_of: fix illegal dereference
@ 2013-02-01 17:10     ` Stef van Os
  0 siblings, 0 replies; 6+ messages in thread
From: Stef van Os @ 2013-02-01 17:10 UTC (permalink / raw)
  To: artem.bityutskiy
  Cc: dwmw2, wfp5p, gregkh, sr, plagnioj, linux-mtd, linux-kernel

On 02/01/2013 05:54 PM, Artem Bityutskiy wrote:
> On Thu, 2013-01-17 at 19:22 +0100, Stef van Os wrote:
>> 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>
> A similar fix already sits in the mtd tree:
>
> http://git.infradead.org/mtd-2.6.git/commit/7dfe4be351e81656ca1068e5d4ead235c7ba94b1
>
Ah, sorry, I wasn't aware of this. But, as long as some fix for this 
issue makes it into mainline, I'm happy :)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-01 17:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 18:22 [PATCH 1/1] mtd: physmap_of: fix illegal dereference Stef van Os
2013-01-17 18:22 ` Stef van Os
2013-02-01 16:54 ` Artem Bityutskiy
2013-02-01 16:54   ` Artem Bityutskiy
2013-02-01 17:10   ` Stef van Os
2013-02-01 17:10     ` Stef van Os

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.