Staging: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Sven Eckelmann 2010-09-18 21:01:14 +02:00 committed by Greg Kroah-Hartman
parent 2d77bb592f
commit 67c3b70593
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,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)