All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Stelian Nirlu <steliannirlu@gmail.com>,
	schwidefsky@de.ibm.com, linux390@de.ibm.com,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390: replace kmalloc + memset with kzalloc
Date: Mon, 11 Mar 2013 12:33:03 +0100	[thread overview]
Message-ID: <20130311113303.GB12193@osiris> (raw)
In-Reply-To: <CAOJsxLGZ=6r85D5OBrFehbpjVSTvK-vaMGQGD9W0ssymT4QyTw@mail.gmail.com>

On Sun, Mar 10, 2013 at 04:14:00PM +0200, Pekka Enberg wrote:
> On Sun, Mar 10, 2013 at 3:13 PM, Stelian Nirlu <steliannirlu@gmail.com> wrote:
> > Signed-off-by: Stelian Nirlu <steliannirlu@gmail.com>
> > ---
> >  arch/s390/net/bpf_jit_comp.c |    3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
> > index 0972e91..e645528 100644
> > --- a/arch/s390/net/bpf_jit_comp.c
> > +++ b/arch/s390/net/bpf_jit_comp.c
> > @@ -747,10 +747,9 @@ void bpf_jit_compile(struct sk_filter *fp)
> >
> >         if (!bpf_jit_enable)
> >                 return;
> > -       addrs = kmalloc(fp->len * sizeof(*addrs), GFP_KERNEL);
> > +       addrs = kzalloc(fp->len * sizeof(*addrs), GFP_KERNEL);
> 
> kcalloc() might be more appropriate here to protect against integer
> overflow if "fp->len" is too large.

Stelian, care to send an updated patch which uses kcalloc()
instead of kzalloc()?

  reply	other threads:[~2013-03-11 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 13:13 [PATCH] s390: replace kmalloc + memset with kzalloc Stelian Nirlu
2013-03-10 14:14 ` Pekka Enberg
2013-03-11 11:33   ` Heiko Carstens [this message]
     [not found]     ` <CACtXKtSzv666_FCHpVm0EkyW=c32kQA9o9-zDqVtJcFYk9mHqQ@mail.gmail.com>
2013-03-11 16:26       ` Stelian Nirlu

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=20130311113303.GB12193@osiris \
    --to=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=penberg@kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=steliannirlu@gmail.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 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.