[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20141005.213146.1400362219156302379.davem@davemloft.net>
Date: Sun, 05 Oct 2014 21:31:46 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: john.fastabend@...il.com
Cc: xiyou.wangcong@...il.com, netdev@...r.kernel.org, jhs@...atatu.com,
eric.dumazet@...il.com
Subject: Re: [PATCH] net: sched: cls_cgroup tear down exts and ematch from
rcu callback
From: John Fastabend <john.fastabend@...il.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@...el.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?
--
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