From: Ben Pfaff Date: Thu, 7 May 2009 00:35:40 +0000 (-0700) Subject: datapath: Call rcu_barrier() before unloading module. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35cc2980d9393c16c69dfe5a3f9faddb77eb6811;p=openvswitch 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. --- 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();