linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: diskonchip: mem resource name is not optional
@ 2014-03-19 22:24 Sasha Levin
  2014-03-22  8:39 ` Alexander Shiyan
  0 siblings, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2014-03-19 22:24 UTC (permalink / raw)
  To: shc_work, computersforpeace; +Cc: Sasha Levin, linux-mtd, linux-kernel

Passing a name to request_mem_region() isn't optional and can't just
be NULL. Passing NULL causes a NULL ptr deref later in the boot
process.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
 drivers/mtd/nand/diskonchip.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
index b9b4db6..f68a7bc 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -1439,7 +1439,7 @@ static int __init doc_probe(unsigned long physadr)
 	int reg, len, numchips;
 	int ret = 0;
 
-	if (!request_mem_region(physadr, DOC_IOREMAP_LEN, NULL))
+	if (!request_mem_region(physadr, DOC_IOREMAP_LEN, "DiskOnChip"))
 		return -EBUSY;
 	virtadr = ioremap(physadr, DOC_IOREMAP_LEN);
 	if (!virtadr) {
-- 
1.7.2.5

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

* Re: [PATCH] mtd: diskonchip: mem resource name is not optional
  2014-03-19 22:24 [PATCH] mtd: diskonchip: mem resource name is not optional Sasha Levin
@ 2014-03-22  8:39 ` Alexander Shiyan
  2014-03-30  0:31   ` Sasha Levin
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Shiyan @ 2014-03-22  8:39 UTC (permalink / raw)
  To: Sasha Levin; +Cc: computersforpeace, linux-mtd, linux-kernel

Wed, 19 Mar 2014 18:24:37 -0400 от Sasha Levin <sasha.levin@oracle.com>:
> Passing a name to request_mem_region() isn't optional and can't just
> be NULL. Passing NULL causes a NULL ptr deref later in the boot
> process.
> 
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> ---
>  drivers/mtd/nand/diskonchip.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
> index b9b4db6..f68a7bc 100644
> --- a/drivers/mtd/nand/diskonchip.c
> +++ b/drivers/mtd/nand/diskonchip.c
> @@ -1439,7 +1439,7 @@ static int __init doc_probe(unsigned long physadr)
>  	int reg, len, numchips;
>  	int ret = 0;
>  
> -	if (!request_mem_region(physadr, DOC_IOREMAP_LEN, NULL))
> +	if (!request_mem_region(physadr, DOC_IOREMAP_LEN, "DiskOnChip"))
>  		return -EBUSY;
>  	virtadr = ioremap(physadr, DOC_IOREMAP_LEN);
>  	if (!virtadr) {
> -- 

Tested-by: Alexander Shiyan <shc_work@mail.ru>

---


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

* Re: [PATCH] mtd: diskonchip: mem resource name is not optional
  2014-03-22  8:39 ` Alexander Shiyan
@ 2014-03-30  0:31   ` Sasha Levin
  2014-04-01  1:46     ` Brian Norris
  0 siblings, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2014-03-30  0:31 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: computersforpeace, linux-mtd, linux-kernel

On 03/22/2014 04:39 AM, Alexander Shiyan wrote:
> Wed, 19 Mar 2014 18:24:37 -0400 от Sasha Levin <sasha.levin@oracle.com>:
>> Passing a name to request_mem_region() isn't optional and can't just
>> be NULL. Passing NULL causes a NULL ptr deref later in the boot
>> process.
>>
>> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
>> ---
>>   drivers/mtd/nand/diskonchip.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
>> index b9b4db6..f68a7bc 100644
>> --- a/drivers/mtd/nand/diskonchip.c
>> +++ b/drivers/mtd/nand/diskonchip.c
>> @@ -1439,7 +1439,7 @@ static int __init doc_probe(unsigned long physadr)
>>   	int reg, len, numchips;
>>   	int ret = 0;
>>
>> -	if (!request_mem_region(physadr, DOC_IOREMAP_LEN, NULL))
>> +	if (!request_mem_region(physadr, DOC_IOREMAP_LEN, "DiskOnChip"))
>>   		return -EBUSY;
>>   	virtadr = ioremap(physadr, DOC_IOREMAP_LEN);
>>   	if (!virtadr) {
>> --
>
> Tested-by: Alexander Shiyan <shc_work@mail.ru>

It seems that no one pulled this patch anywhere. It fixes a straightforward
boot failure on boot when diskonchip is enabled in the config.

Someone grab it please?


Thanks,
Sasha

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

* Re: [PATCH] mtd: diskonchip: mem resource name is not optional
  2014-03-30  0:31   ` Sasha Levin
@ 2014-04-01  1:46     ` Brian Norris
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2014-04-01  1:46 UTC (permalink / raw)
  To: Sasha Levin; +Cc: linux-mtd, linux-kernel, Alexander Shiyan

On Sat, Mar 29, 2014 at 08:31:52PM -0400, Sasha Levin wrote:
> On 03/22/2014 04:39 AM, Alexander Shiyan wrote:
> >Wed, 19 Mar 2014 18:24:37 -0400 от Sasha Levin <sasha.levin@oracle.com>:
> >>Passing a name to request_mem_region() isn't optional and can't just
> >>be NULL. Passing NULL causes a NULL ptr deref later in the boot
> >>process.
> >>
> >>Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> >>---
> >>  drivers/mtd/nand/diskonchip.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >>diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
> >>index b9b4db6..f68a7bc 100644
> >>--- a/drivers/mtd/nand/diskonchip.c
> >>+++ b/drivers/mtd/nand/diskonchip.c
> >>@@ -1439,7 +1439,7 @@ static int __init doc_probe(unsigned long physadr)
> >>  	int reg, len, numchips;
> >>  	int ret = 0;
> >>
> >>-	if (!request_mem_region(physadr, DOC_IOREMAP_LEN, NULL))
> >>+	if (!request_mem_region(physadr, DOC_IOREMAP_LEN, "DiskOnChip"))
> >>  		return -EBUSY;
> >>  	virtadr = ioremap(physadr, DOC_IOREMAP_LEN);
> >>  	if (!virtadr) {
> >>--
> >
> >Tested-by: Alexander Shiyan <shc_work@mail.ru>
> 
> It seems that no one pulled this patch anywhere. It fixes a straightforward
> boot failure on boot when diskonchip is enabled in the config.
> 
> Someone grab it please?

Pushed to l2-mtd.git, marked for stable >= 3.14.

Brian

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

end of thread, other threads:[~2014-04-01  1:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-19 22:24 [PATCH] mtd: diskonchip: mem resource name is not optional Sasha Levin
2014-03-22  8:39 ` Alexander Shiyan
2014-03-30  0:31   ` Sasha Levin
2014-04-01  1:46     ` Brian Norris

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).