]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sched/cls_cgroup.c
net, sched: respect rcu grace period on cls destruction
[karo-tx-linux.git] / net / sched / cls_cgroup.c
index 85233c470035f7f618e7550a1789102e2208a757..c1f20077837f06bb1998f5621c797e575e10ca21 100644 (file)
@@ -137,11 +137,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;
 }