Skip to content

Commit 46e235c

Browse files
congwangdavem330
authored andcommitted
net_sched: fix call_rcu() race on act_sample module removal
Similar to commit c78e174 ("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>
1 parent 2d132eb commit 46e235c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/sched/act_sample.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ static int __init sample_init_module(void)
264264

265265
static void __exit sample_cleanup_module(void)
266266
{
267+
rcu_barrier();
267268
tcf_unregister_action(&act_sample_ops, &sample_net_ops);
268269
}
269270

0 commit comments

Comments
 (0)