summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann2010-09-18 21:01:14 +0200
committerGreg Kroah-Hartman2010-09-21 01:29:48 +0200
commit67c3b705934af93a09a0f369346c2561499b73c4 (patch)
tree5dea1b9e38904b368bc768432f5864fd5eaf482a
parentStaging: batman-adv: Mark debugfs files as nonseekable (diff)
downloadkernel-qcow2-linux-67c3b705934af93a09a0f369346c2561499b73c4.tar.gz
kernel-qcow2-linux-67c3b705934af93a09a0f369346c2561499b73c4.tar.xz
kernel-qcow2-linux-67c3b705934af93a09a0f369346c2561499b73c4.zip
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>
-rw-r--r--drivers/staging/batman-adv/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c
index 78ceebf75449..580ca02fc705 100644
--- a/drivers/staging/batman-adv/main.c
+++ b/drivers/staging/batman-adv/main.c
@@ -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)