From 35cc2980d9393c16c69dfe5a3f9faddb77eb6811 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 6 May 2009 17:35:40 -0700 Subject: [PATCH] datapath: Call rcu_barrier() before unloading module. According to article "RCU and Unloadable Modules" available at lwn.net, a module that uses RCU callbacks should call rcu_barrier() before unloading, because synchronize_rcu() does not ensure that all RCU callbacks have actually completed, only that a grace period has elapsed. --- datapath/datapath.c | 1 + 1 file changed, 1 insertion(+) diff --git a/datapath/datapath.c b/datapath/datapath.c index 252e3e00..d3dd6909 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -1648,6 +1648,7 @@ error: static void dp_cleanup(void) { + rcu_barrier(); unregister_chrdev(major, "openvswitch"); unregister_netdevice_notifier(&dp_device_notifier); flow_exit(); -- 2.30.2