All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	brouer@redhat.com
Subject: Re: [net-next PATCH v1 08/15] net: sched: RCU cls_tcindex
Date: Sun, 27 Jul 2014 15:01:12 -0700	[thread overview]
Message-ID: <53D576A8.3010904@gmail.com> (raw)
In-Reply-To: <CAM_iQpUJJ02hSkTfw328D8QW_4iuWcZode0JGpguecx5GUf5Jw@mail.gmail.com>

On 07/27/2014 12:15 PM, Cong Wang wrote:
> On Fri, Jul 25, 2014 at 9:29 PM, John Fastabend
> <john.fastabend@gmail.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

  reply	other threads:[~2014-07-27 22:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26  4:25 [net-next PATCH v1 00/15] RCU sched classifiers John Fastabend
2014-07-26  4:25 ` [net-next PATCH v1 01/15] net: qdisc: use rcu prefix and silence sparse warnings John Fastabend
2014-07-27 23:46   ` Nikolay Aleksandrov
2014-07-26  4:25 ` [net-next PATCH v1 02/15] net: rcu-ify tcf_proto John Fastabend
2014-07-26  4:26 ` [net-next PATCH v1 03/15] net: sched: cls_basic use RCU John Fastabend
2014-07-26  4:27 ` [net-next PATCH v1 04/15] net: sched: cls_cgroup " John Fastabend
2014-07-26  4:27 ` [net-next PATCH v1 05/15] net: sched: cls_flow " John Fastabend
2014-07-26  4:28 ` [net-next PATCH v1 06/15] net: sched: fw " John Fastabend
2014-07-26  4:28 ` [net-next PATCH v1 07/15] net: sched: RCU cls_route John Fastabend
2014-07-26  4:29 ` [net-next PATCH v1 08/15] net: sched: RCU cls_tcindex John Fastabend
2014-07-27 19:15   ` Cong Wang
2014-07-27 22:01     ` John Fastabend [this message]
2014-07-26  4:29 ` [net-next PATCH v1 09/15] net: sched: make cls_u32 lockless John Fastabend
2014-07-26  4:30 ` [net-next PATCH v1 10/15] net: sched: rcu'ify cls_rsvp John Fastabend
2014-07-26  4:30 ` [net-next PATCH v1 11/15] net: sched: rcu'ify cls_bpf John Fastabend
2014-07-26  4:31 ` [net-next PATCH v1 12/15] net: sched: make tc_action safe to walk under RCU John Fastabend
2014-07-26  4:31 ` [net-next PATCH v1 13/15] net: sched: make bstats per cpu and estimator RCU safe John Fastabend
2014-07-26  4:32 ` [net-next PATCH v1 14/15] net: sched: make qstats per cpu John Fastabend
2014-07-26  4:32 ` [net-next PATCH v1 15/15] net: sched: drop ingress qdisc lock John Fastabend

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=53D576A8.3010904@gmail.com \
    --to=john.fastabend@gmail.com \
    --cc=brouer@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=xiyou.wangcong@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.