mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 01:23:00 -04:00
net: sched: cls_cgroup tear down exts and ematch from rcu callback
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 <[email protected]> Acked-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
82a470f111
commit
13990f8156
1 changed files with 1 additions and 3 deletions
|
|
@ -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->ematches);
|
||||
RCU_INIT_POINTER(tp->root, NULL);
|
||||
kfree_rcu(head, rcu);
|
||||
call_rcu(&head->rcu, cls_cgroup_destroy_rcu);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue