Skip to content

Commit 7683fdc

Browse files
Antonio Quartulliecsv
authored andcommitted
batman-adv: protect the local and the global trans-tables with rcu
The local and the global translation-tables are now lock free and rcu protected. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
1 parent cc47f66 commit 7683fdc

5 files changed

Lines changed: 150 additions & 128 deletions

File tree

‎net/batman-adv/main.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ int mesh_init(struct net_device *soft_iface)
8484

8585
spin_lock_init(&bat_priv->forw_bat_list_lock);
8686
spin_lock_init(&bat_priv->forw_bcast_list_lock);
87-
spin_lock_init(&bat_priv->tt_lhash_lock);
88-
spin_lock_init(&bat_priv->tt_ghash_lock);
8987
spin_lock_init(&bat_priv->tt_changes_list_lock);
9088
spin_lock_init(&bat_priv->tt_req_list_lock);
9189
spin_lock_init(&bat_priv->tt_roam_list_lock);

‎net/batman-adv/routing.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ static void update_transtable(struct bat_priv *bat_priv,
9090
/* Even if we received the crc into the OGM, we prefer
9191
* to recompute it to spot any possible inconsistency
9292
* in the global table */
93-
spin_lock_bh(&bat_priv->tt_ghash_lock);
9493
orig_node->tt_crc = tt_global_crc(bat_priv, orig_node);
95-
spin_unlock_bh(&bat_priv->tt_ghash_lock);
9694
/* Roaming phase is over: tables are in sync again. I can
9795
* unset the flag */
9896
orig_node->tt_poss_change = false;

0 commit comments

Comments
 (0)