The following commit has been merged in the next branch: commit 7e95742719e5cec4dc99c392032c038fb0cffb54 Author: Sven Eckelmann sven.eckelmann@gmx.de Date: Sat Sep 18 11:11:40 2010 +0000
batman-adv: wait for call_rcu before unloading module
synchronize_rcu respective synchronize_net only waits for the rcu grace period to elapse and we may fail to finish the calls which were made to call_rcu in that time. In result the module could be unloaded during the execution of the RCU callbacks.
rcu_barrier[1] will now wait for all outstanding RCU callbacks to finish before continuing.
[1] Documentation/RCU/rcubarrier.txt
Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
diff --git a/main.c b/main.c index c9d3be5..0a9f6f3 100644 --- a/main.c +++ b/main.c @@ -73,7 +73,7 @@ static void __exit batman_exit(void) destroy_workqueue(bat_event_workqueue); bat_event_workqueue = NULL;
- synchronize_net(); + rcu_barrier(); }
int mesh_init(struct net_device *soft_iface)