From: John Fastabend <john.fastabend@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: xiyou.wangcong@gmail.com, netdev@vger.kernel.org,
jhs@mojatatu.com, eric.dumazet@gmail.com
Subject: Re: [PATCH] net: sched: cls_cgroup tear down exts and ematch from rcu callback
Date: Sun, 05 Oct 2014 18:48:20 -0700 [thread overview]
Message-ID: <5431F4E4.8000209@gmail.com> (raw)
In-Reply-To: <20141005.213146.1400362219156302379.davem@davemloft.net>
On 10/05/2014 06:31 PM, David Miller wrote:
> From: John Fastabend <john.fastabend@gmail.com>
> Date: Fri, 03 Oct 2014 09:33:35 -0700
>
>> It is not RCU safe to destroy the action chain while there
>> is a possibility of readers accessing it. Move this code
>> into the rcu callback using the same rcu callback used in the
>> code patch to make a change to head.
>>
>> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
> ...
>> @@ -156,10 +156,8 @@ static void cls_cgroup_destroy(struct tcf_proto *tp)
>> struct cls_cgroup_head *head = rtnl_dereference(tp->root);
>>
>> if (head) {
>> - tcf_exts_destroy(&head->exts);
>> - tcf_em_tree_destroy(head->net, &head->ematches);
>> RCU_INIT_POINTER(tp->root, NULL);
>> - kfree_rcu(head, rcu);
>> + call_rcu(&head->rcu, cls_cgroup_destroy_rcu);
>> }
>
> tcf_em_tree_destroy() takes head->tp as it's first argument in my
> net-next tree, maybe you need to respin this?
>
Yep, I'll respin this now sorry about that got a bit out of sync.
Thanks!
--
John Fastabend Intel Corporation
prev parent reply other threads:[~2014-10-06 1:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 16:33 [PATCH] net: sched: cls_cgroup tear down exts and ematch from rcu callback John Fastabend
2014-10-06 1:31 ` David Miller
2014-10-06 1:48 ` John Fastabend [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=5431F4E4.8000209@gmail.com \
--to=john.fastabend@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--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.