summaryrefslogtreecommitdiffstats
path: root/kernel/net/sched/cls_cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/net/sched/cls_cgroup.c')
-rw-r--r--kernel/net/sched/cls_cgroup.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/net/sched/cls_cgroup.c b/kernel/net/sched/cls_cgroup.c
index 4c85bd3a7..c104c2019 100644
--- a/kernel/net/sched/cls_cgroup.c
+++ b/kernel/net/sched/cls_cgroup.c
@@ -130,11 +130,10 @@ static bool cls_cgroup_destroy(struct tcf_proto *tp, bool force)
if (!force)
return false;
-
- if (head) {
- RCU_INIT_POINTER(tp->root, NULL);
+ /* Head can still be NULL due to cls_cgroup_init(). */
+ if (head)
call_rcu(&head->rcu, cls_cgroup_destroy_rcu);
- }
+
return true;
}