diff options
author | Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | 2011-01-19 15:01:43 -0500 |
---|---|---|
committer | Marek Lindner <lindner_marek@yahoo.de> | 2011-03-05 06:50:01 -0500 |
commit | a4c135c561106c397bae33455acfca4aa8065a30 (patch) | |
tree | 09613dd5443fb6abfdab5b851eccdd610d1b0783 /net/batman-adv/unicast.c | |
parent | 2ae2daf6c3f23364862a7d4f2ca79eab041b701b (diff) |
batman-adv: protect bonding with rcu locks
bonding / alternating candidates need to be secured by rcu locks
as well. This patch therefore converts the bonding list
from a plain pointer list to a rcu securable lists and references
the bonding candidates.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/unicast.c')
-rw-r--r-- | net/batman-adv/unicast.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index 4687027f1495..00bfeaf9ece3 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c | |||
@@ -299,6 +299,7 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv) | |||
299 | if (!orig_node) | 299 | if (!orig_node) |
300 | orig_node = transtable_search(bat_priv, ethhdr->h_dest); | 300 | orig_node = transtable_search(bat_priv, ethhdr->h_dest); |
301 | 301 | ||
302 | /* find_router() increases neigh_nodes refcount if found. */ | ||
302 | router = find_router(bat_priv, orig_node, NULL); | 303 | router = find_router(bat_priv, orig_node, NULL); |
303 | 304 | ||
304 | if (!router) | 305 | if (!router) |
@@ -306,7 +307,6 @@ int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv) | |||
306 | 307 | ||
307 | /* don't lock while sending the packets ... we therefore | 308 | /* don't lock while sending the packets ... we therefore |
308 | * copy the required data before sending */ | 309 | * copy the required data before sending */ |
309 | |||
310 | batman_if = router->if_incoming; | 310 | batman_if = router->if_incoming; |
311 | memcpy(dstaddr, router->addr, ETH_ALEN); | 311 | memcpy(dstaddr, router->addr, ETH_ALEN); |
312 | 312 | ||