Skip to content

Commit

Permalink
net_sched: fix call_rcu() race on act_sample module removal
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: Jiri Pirko <[email protected]>
Cc: Jamal Hadi Salim <[email protected]>
Cc: "Paul E. McKenney" <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
congwang authored and davem330 committed Oct 29, 2017
1 parent 2d132eb commit 46e235c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/act_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 46e235c

Please sign in to comment.