[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53D576A8.3010904@gmail.com>
Date: Sun, 27 Jul 2014 15:01:12 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
CC: Jamal Hadi Salim <jhs@...atatu.com>,
Eric Dumazet <eric.dumazet@...il.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>, brouer@...hat.com
Subject: Re: [net-next PATCH v1 08/15] net: sched: RCU cls_tcindex
On 07/27/2014 12:15 PM, Cong Wang wrote:
> On Fri, Jul 25, 2014 at 9:29 PM, John Fastabend
> <john.fastabend@...il.com> wrote:
>> +
>> + if (p->perfect) {
>> + cp->perfect = kcalloc(cp->hash, sizeof(*r), GFP_KERNEL);
>> + memcpy(cp->perfect, p->perfect, sizeof(*r) * cp->hash);
>> + }
>
> a) You forget to check the return value of kcalloc()
> b) You can use kmemdup()
>
Ah good catch. I'll wait a bit for more feedback then send
a v2 with the fix.
Thanks!
John
--
John Fastabend Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists