From: Artem Bityutskiy <dedekind1@gmail.com>
To: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Cc: dwmw2@infradead.org, rpurdie@openedhand.com,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtdoops: fix the oops_page_used array size
Date: Sun, 04 Dec 2011 15:44:57 +0200 [thread overview]
Message-ID: <1323006318.9400.52.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1322563758-26317-1-git-send-email-roman.tereshonkov@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
On Tue, 2011-11-29 at 12:49 +0200, Roman Tereshonkov wrote:
> The array of unsigned long pointed by oops_page_used is allocated
> by vmalloc which requires the size to be in bytes.
>
> Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
> ---
> drivers/mtd/mtdoops.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
> index 1e2fa62..0782b31 100644
> --- a/drivers/mtd/mtdoops.c
> +++ b/drivers/mtd/mtdoops.c
> @@ -369,7 +369,7 @@ static void mtdoops_notify_add(struct mtd_info *mtd)
>
> /* oops_page_used is a bit field */
> cxt->oops_page_used = vmalloc(DIV_ROUND_UP(mtdoops_pages,
> - BITS_PER_LONG));
> + BITS_PER_LONG) * sizeof(unsigned long));
But it is already in bytes. I do not understand which problem this patch
fixes - it looks incorrect to me.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2011-12-04 13:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 10:49 [PATCH] mtdoops: fix the oops_page_used array size Roman Tereshonkov
2011-12-04 13:44 ` Artem Bityutskiy [this message]
2011-12-07 15:25 ` Roman Tereshonkov
2011-12-08 21:58 ` 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=1323006318.9400.52.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=roman.tereshonkov@nokia.com \
--cc=rpurdie@openedhand.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).