From: Boaz Harrosh <bharrosh@panasas.com>
To: Fabian Frederick <fabf@skynet.be>, <linux-kernel@vger.kernel.org>
Cc: <osd-dev@open-osd.org>, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/1] fs/exofs/ore_raid.c: replace count*size kzalloc by kcalloc
Date: Sun, 13 Jul 2014 13:01:25 +0300 [thread overview]
Message-ID: <53C258F5.7070305@panasas.com> (raw)
In-Reply-To: <1403720063-19061-1-git-send-email-fabf@skynet.be>
On 06/25/2014 09:14 PM, Fabian Frederick wrote:
> kcalloc manages count*sizeof overflow.
>
> Cc: Boaz Harrosh <bharrosh@panasas.com>
ACK-by: Boaz Harrosh <bharrosh@panasas.com>
Do you need that I submit this through my tree?
Thanks
Boaz
> Cc: osd-dev@open-osd.org
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> fs/exofs/ore_raid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/exofs/ore_raid.c b/fs/exofs/ore_raid.c
> index 7f20f25..84529b8 100644
> --- a/fs/exofs/ore_raid.c
> +++ b/fs/exofs/ore_raid.c
> @@ -116,7 +116,7 @@ static int _sp2d_alloc(unsigned pages_in_unit, unsigned group_width,
> num_a1pa = min_t(unsigned, PAGE_SIZE / sizeof__a1pa,
> pages_in_unit - i);
>
> - __a1pa = kzalloc(num_a1pa * sizeof__a1pa, GFP_KERNEL);
> + __a1pa = kcalloc(num_a1pa, sizeof__a1pa, GFP_KERNEL);
> if (unlikely(!__a1pa)) {
> ORE_DBGMSG("!! Failed to _alloc_1p_arrays=%d\n",
> num_a1pa);
>
prev parent reply other threads:[~2014-07-13 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 18:14 [PATCH 1/1] fs/exofs/ore_raid.c: replace count*size kzalloc by kcalloc Fabian Frederick
2014-07-13 10:01 ` Boaz Harrosh [this message]
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=53C258F5.7070305@panasas.com \
--to=bharrosh@panasas.com \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=osd-dev@open-osd.org \
/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 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.