From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Sasha Levin" <sasha.levin@oracle.com>
Cc: computersforpeace@gmail.com, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: diskonchip: mem resource name is not optional
Date: Sat, 22 Mar 2014 12:39:32 +0400 [thread overview]
Message-ID: <1395477572.57478225@f224.i.mail.ru> (raw)
In-Reply-To: <1395267877-15223-1-git-send-email-sasha.levin@oracle.com>
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>
---
next prev parent reply other threads:[~2014-03-22 8:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 22:24 [PATCH] mtd: diskonchip: mem resource name is not optional Sasha Levin
2014-03-22 8:39 ` Alexander Shiyan [this message]
2014-03-30 0:31 ` Sasha Levin
2014-04-01 1:46 ` Brian Norris
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=1395477572.57478225@f224.i.mail.ru \
--to=shc_work@mail.ru \
--cc=computersforpeace@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=sasha.levin@oracle.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;
as well as URLs for NNTP newsgroup(s).