Subject: Re: [net-next PATCH v1 08/15] net: sched: RCU cls_tcindex

From: John Fastabend <[email-masked]>
Date: Sun, 27 Jul 2014 15:01:12 -0700

On 07/27/2014 12:15 PM, Cong Wang wrote:
> On Fri, Jul 25, 2014 at 9:29 PM, John Fastabend
> <[email-masked]> 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