* [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits
@ 2009-06-26 20:45 Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 1/5] bridge: Use rcu_barrier() instead of syncronize_net() on unload Jesper Dangaard Brouer
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Jesper Dangaard Brouer @ 2009-06-26 20:45 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Jesper Dangaard Brouer
(This time I don't use "stg mail --auto" as it does not seem to do
appropiate double quoting of mail addresses with a "." char in.
Thus hoping vger will not eat my mails again again!)
This patchset is a resubmit of the network related part of a patchseries
titled "We must use rcu_barrier() on module unload". Just to make it
easier for DaveM to pick it up.
If an unloadable module uses RCU callbacks, it need to use
rcu_barrier() so that the module may be safely unloaded.
For documentation see:
Paul E. McKenney's Blog
http://paulmck.livejournal.com/7314.html
http://lwn.net/Articles/217484/
Documentation/RCU/rcubarrier.txt
Patchset is made on top of Linus'es tree, 4075ea8c54a7506844a69f674990241e7766357b.
But I have testet is applies to net-next-2.6.
---
Jesper Dangaard Brouer (5):
decnet: Use rcu_barrier() on module unload.
ipv6: Use rcu_barrier() on module unload.
sunrpc: Use rcu_barrier() on unload.
mac80211: Use rcu_barrier() on unload.
bridge: Use rcu_barrier() instead of syncronize_net() on unload.
net/bridge/br.c | 2 +-
net/decnet/af_decnet.c | 2 ++
net/ipv6/af_inet6.c | 2 ++
net/mac80211/mesh.c | 2 +-
net/sunrpc/sunrpc_syms.c | 1 +
5 files changed, 7 insertions(+), 2 deletions(-)
--
Best regards,
Jesper Brouer
ComX Networks A/S
Linux Network developer
Cand. Scient Datalog / MSc.
Author of http://adsl-optimizer.dk
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] bridge: Use rcu_barrier() instead of syncronize_net() on unload.
2009-06-26 20:45 [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits Jesper Dangaard Brouer
@ 2009-06-26 20:45 ` Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 2/5] mac80211: Use rcu_barrier() " Jesper Dangaard Brouer
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jesper Dangaard Brouer @ 2009-06-26 20:45 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Jesper Dangaard Brouer
When unloading modules that uses call_rcu() callbacks, then we must
use rcu_barrier(). This module uses syncronize_net() which is not
enough to be sure that all callback has been completed.
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
---
net/bridge/br.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/bridge/br.c b/net/bridge/br.c
index 9aac521..e1241c7 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -93,7 +93,7 @@ static void __exit br_deinit(void)
unregister_pernet_subsys(&br_net_ops);
- synchronize_net();
+ rcu_barrier(); /* Wait for completion of call_rcu()'s */
br_netfilter_fini();
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] mac80211: Use rcu_barrier() on unload.
2009-06-26 20:45 [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 1/5] bridge: Use rcu_barrier() instead of syncronize_net() on unload Jesper Dangaard Brouer
@ 2009-06-26 20:45 ` Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 3/5] sunrpc: " Jesper Dangaard Brouer
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jesper Dangaard Brouer @ 2009-06-26 20:45 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Jesper Dangaard Brouer
The mac80211 module uses rcu_call() thus it should use rcu_barrier()
on module unload.
The rcu_barrier() is placed in mech.c ieee80211_stop_mesh() which is
invoked from ieee80211_stop() in case vif.type == NL80211_IFTYPE_MESH_POINT.
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
---
net/mac80211/mesh.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index fc712e6..11cf45b 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -494,7 +494,7 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
* should it be using the interface and enqueuing
* frames at this very time on another CPU.
*/
- synchronize_rcu();
+ rcu_barrier(); /* Wait for RX path and call_rcu()'s */
skb_queue_purge(&sdata->u.mesh.skb_queue);
}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] sunrpc: Use rcu_barrier() on unload.
2009-06-26 20:45 [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 1/5] bridge: Use rcu_barrier() instead of syncronize_net() on unload Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 2/5] mac80211: Use rcu_barrier() " Jesper Dangaard Brouer
@ 2009-06-26 20:45 ` Jesper Dangaard Brouer
2009-06-26 20:46 ` [PATCH 4/5] ipv6: Use rcu_barrier() on module unload Jesper Dangaard Brouer
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jesper Dangaard Brouer @ 2009-06-26 20:45 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Jesper Dangaard Brouer
The sunrpc module uses rcu_call() thus it should use rcu_barrier() on
module unload.
Have not verified that the possibility for new call_rcu() callbacks
has been disabled. As a hint for checking, the functions calling
call_rcu() (unx_destroy_cred and generic_destroy_cred) are
registered as crdestroy function pointer in struct rpc_credops.
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
---
net/sunrpc/sunrpc_syms.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index 843629f..adaa819 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -66,6 +66,7 @@ cleanup_sunrpc(void)
#ifdef CONFIG_PROC_FS
rpc_proc_exit();
#endif
+ rcu_barrier(); /* Wait for completion of call_rcu()'s */
}
MODULE_LICENSE("GPL");
module_init(init_sunrpc);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] ipv6: Use rcu_barrier() on module unload.
2009-06-26 20:45 [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits Jesper Dangaard Brouer
` (2 preceding siblings ...)
2009-06-26 20:45 ` [PATCH 3/5] sunrpc: " Jesper Dangaard Brouer
@ 2009-06-26 20:46 ` Jesper Dangaard Brouer
2009-06-26 20:46 ` [PATCH 5/5] decnet: " Jesper Dangaard Brouer
2009-06-26 20:52 ` [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits David Miller
5 siblings, 0 replies; 7+ messages in thread
From: Jesper Dangaard Brouer @ 2009-06-26 20:46 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Jesper Dangaard Brouer
The ipv6 module uses rcu_call() thus it should use rcu_barrier() on
module unload.
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
---
net/ipv6/af_inet6.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 85b3d00..caa0278 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -1284,6 +1284,8 @@ static void __exit inet6_exit(void)
proto_unregister(&udplitev6_prot);
proto_unregister(&udpv6_prot);
proto_unregister(&tcpv6_prot);
+
+ rcu_barrier(); /* Wait for completion of call_rcu()'s */
}
module_exit(inet6_exit);
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] decnet: Use rcu_barrier() on module unload.
2009-06-26 20:45 [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits Jesper Dangaard Brouer
` (3 preceding siblings ...)
2009-06-26 20:46 ` [PATCH 4/5] ipv6: Use rcu_barrier() on module unload Jesper Dangaard Brouer
@ 2009-06-26 20:46 ` Jesper Dangaard Brouer
2009-06-26 20:52 ` [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits David Miller
5 siblings, 0 replies; 7+ messages in thread
From: Jesper Dangaard Brouer @ 2009-06-26 20:46 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Jesper Dangaard Brouer
The decnet module unloading as been disabled with a '#if 0' statement,
because it have had issues.
We add a rcu_barrier() anyhow for correctness.
The maintainer (Chrissie Caulfield) will look into the unload issue
when time permits.
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Chrissie Caulfield <christine.caulfield@googlemail.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
---
net/decnet/af_decnet.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index d351b8d..77d4028 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -2413,6 +2413,8 @@ static void __exit decnet_exit(void)
proc_net_remove(&init_net, "decnet");
proto_unregister(&dn_proto);
+
+ rcu_barrier_bh(); /* Wait for completion of call_rcu_bh()'s */
}
module_exit(decnet_exit);
#endif
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits
2009-06-26 20:45 [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits Jesper Dangaard Brouer
` (4 preceding siblings ...)
2009-06-26 20:46 ` [PATCH 5/5] decnet: " Jesper Dangaard Brouer
@ 2009-06-26 20:52 ` David Miller
5 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2009-06-26 20:52 UTC (permalink / raw)
To: hawk; +Cc: netdev
From: Jesper Dangaard Brouer <hawk@comx.dk>
Date: Fri, 26 Jun 2009 22:45:43 +0200
> This patchset is a resubmit of the network related part of a patchseries
> titled "We must use rcu_barrier() on module unload". Just to make it
> easier for DaveM to pick it up.
>
> If an unloadable module uses RCU callbacks, it need to use
> rcu_barrier() so that the module may be safely unloaded.
All applied, thanks a lot!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-06-26 20:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-26 20:45 [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 1/5] bridge: Use rcu_barrier() instead of syncronize_net() on unload Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 2/5] mac80211: Use rcu_barrier() " Jesper Dangaard Brouer
2009-06-26 20:45 ` [PATCH 3/5] sunrpc: " Jesper Dangaard Brouer
2009-06-26 20:46 ` [PATCH 4/5] ipv6: Use rcu_barrier() on module unload Jesper Dangaard Brouer
2009-06-26 20:46 ` [PATCH 5/5] decnet: " Jesper Dangaard Brouer
2009-06-26 20:52 ` [PATCH 0/5] rcu_barrier: Resubmitting the the networking bits David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.