Skip to content

Commit

Permalink
net/smc: use rcu_barrier() on module unload
Browse files Browse the repository at this point in the history
Add rcu_barrier() to make sure no RCU readers or callbacks are
pending when the module is unloaded.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ursula Braun authored and David S. Miller committed Nov 16, 2019
1 parent a33a803 commit 4ead9c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/smc/af_smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/in.h>
#include <linux/sched/signal.h>
#include <linux/if_vlan.h>
#include <linux/rcupdate_wait.h>

#include <net/sock.h>
#include <net/tcp.h>
Expand Down Expand Up @@ -2111,6 +2112,7 @@ static void __exit smc_exit(void)
proto_unregister(&smc_proto);
smc_pnet_exit();
unregister_pernet_subsys(&smc_net_ops);
rcu_barrier();
}

module_init(smc_init);
Expand Down

0 comments on commit 4ead9c9

Please sign in to comment.