From 6baeafd1f2a54ca041ff71778ebda9fac75aad12 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 13 Dec 2016 20:16:40 -0300 Subject: Linux-libre 4.8.14-gnu --- net/sched/cls_cgroup.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'net/sched/cls_cgroup.c') diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 4c85bd3a7..c104c2019 100644 --- a/net/sched/cls_cgroup.c +++ b/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; } -- cgit v1.2.3-54-g00ecf