* [B.A.T.M.A.N.] [PATCH] batman-adv: wait for call_rcu before unloading module
@ 2010-09-15 21:09 Sven Eckelmann
2010-09-18 11:11 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2010-09-15 21:09 UTC (permalink / raw)
To: b.a.t.m.a.n
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>
---
batman-adv/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/batman-adv/main.c b/batman-adv/main.c
index e8acb46..a067f75 100644
--- a/batman-adv/main.c
+++ b/batman-adv/main.c
@@ -74,7 +74,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)
--
1.7.2.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: wait for call_rcu before unloading module
2010-09-15 21:09 [B.A.T.M.A.N.] [PATCH] batman-adv: wait for call_rcu before unloading module Sven Eckelmann
@ 2010-09-18 11:11 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2010-09-18 11:11 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Wednesday 15 September 2010 23:09:36 Sven Eckelmann wrote:
> 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
Applied in revision 1794.
Thanks,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-18 11:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-15 21:09 [B.A.T.M.A.N.] [PATCH] batman-adv: wait for call_rcu before unloading module Sven Eckelmann
2010-09-18 11:11 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).