From: Cong Wang Date: Fri, 27 Oct 2017 01:24:41 +0000 (-0700) Subject: net_sched: fix call_rcu() race on act_sample module removal X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=46e235c15ca44f34cb79f4dbec909b8c51999dc1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net_sched: fix call_rcu() race on act_sample module removal Similar to commit c78e1746d3ad ("net: sched: fix call_rcu() race on classifier module unloads"), we need to wait for flying RCU callback tcf_sample_cleanup_rcu(). Cc: Yotam Gigi Cc: Daniel Borkmann Cc: Jiri Pirko Cc: Jamal Hadi Salim Cc: "Paul E. McKenney" Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c index ec986ae52808..a9f9a2ccc664 100644 --- a/net/sched/act_sample.c +++ b/net/sched/act_sample.c @@ -264,6 +264,7 @@ static int __init sample_init_module(void) static void __exit sample_cleanup_module(void) { + rcu_barrier(); tcf_unregister_action(&act_sample_ops, &sample_net_ops); }