net: sched: remove tcf_proto from ematch calls
This removes the tcf_proto argument from the ematch code paths that only need it to reference the net namespace. This allows simplifying qdisc code paths especially when we need to tear down the ematch from an RCU callback. In this case we can not guarentee that the tcf_proto structure is still valid. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Cong Wang <cwang@twopensource.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fcbeb976d7
commit
82a470f111
10 changed files with 26 additions and 25 deletions
|
@ -87,7 +87,7 @@ static void cls_cgroup_destroy_rcu(struct rcu_head *root)
|
|||
rcu);
|
||||
|
||||
tcf_exts_destroy(&head->exts);
|
||||
tcf_em_tree_destroy(head->tp, &head->ematches);
|
||||
tcf_em_tree_destroy(&head->ematches);
|
||||
kfree(head);
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ static void cls_cgroup_destroy(struct tcf_proto *tp)
|
|||
|
||||
if (head) {
|
||||
tcf_exts_destroy(&head->exts);
|
||||
tcf_em_tree_destroy(tp, &head->ematches);
|
||||
tcf_em_tree_destroy(&head->ematches);
|
||||
RCU_INIT_POINTER(tp->root, NULL);
|
||||
kfree_rcu(head, rcu);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue