summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2017-10-26 18:24:41 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-29 22:49:31 +0900
commit46e235c15ca44f34cb79f4dbec909b8c51999dc1 (patch)
treecd968c0a4bb7b8db08d09541301f95290c13db1e /net
parent2d132eba1d972ea6c0e47286e4c821b4a3c5b84d (diff)
downloadop-kernel-dev-46e235c15ca44f34cb79f4dbec909b8c51999dc1.zip
op-kernel-dev-46e235c15ca44f34cb79f4dbec909b8c51999dc1.tar.gz
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 <yotamg@mellanox.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jiri Pirko <jiri@resnulli.us> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/act_sample.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c
index ec986ae..a9f9a2cc 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);
}
OpenPOWER on IntegriCloud