diff options
author | Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | 2011-01-19 20:01:43 +0000 |
---|---|---|
committer | Marek Lindner <lindner_marek@yahoo.de> | 2011-03-05 12:50:01 +0100 |
commit | a4c135c561106c397bae33455acfca4aa8065a30 (patch) | |
tree | 09613dd5443fb6abfdab5b851eccdd610d1b0783 /net/batman-adv/types.h | |
parent | 2ae2daf6c3f23364862a7d4f2ca79eab041b701b (diff) | |
download | kernel_samsung_smdk4412-a4c135c561106c397bae33455acfca4aa8065a30.zip kernel_samsung_smdk4412-a4c135c561106c397bae33455acfca4aa8065a30.tar.gz kernel_samsung_smdk4412-a4c135c561106c397bae33455acfca4aa8065a30.tar.bz2 |
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/types.h')
-rw-r--r-- | net/batman-adv/types.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index ff70afc..1f833f0 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -90,10 +90,8 @@ struct orig_node { struct bat_priv *bat_priv; unsigned long last_frag_packet; spinlock_t ogm_cnt_lock; /* protects ogm counter */ - struct { - uint8_t candidates; - struct neigh_node *selected; - } bond; + atomic_t bond_candidates; + struct list_head bond_list; }; struct gw_node { @@ -116,11 +114,12 @@ struct neigh_node { uint8_t tq_index; uint8_t tq_avg; uint8_t last_ttl; - struct neigh_node *next_bond_candidate; + struct list_head bonding_list; unsigned long last_valid; unsigned long real_bits[NUM_WORDS]; struct kref refcount; struct rcu_head rcu; + struct rcu_head rcu_bond; struct orig_node *orig_node; struct batman_if *if_incoming; }; |