Skip to content

Commit

Permalink
batman-adv: protect the local and the global trans-tables with rcu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonio Quartulli authored and Sven Eckelmann committed Jun 20, 2011
1 parent cc47f66 commit 7683fdc
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 128 deletions.
2 changes: 0 additions & 2 deletions net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ int mesh_init(struct net_device *soft_iface)

spin_lock_init(&bat_priv->forw_bat_list_lock);
spin_lock_init(&bat_priv->forw_bcast_list_lock);
spin_lock_init(&bat_priv->tt_lhash_lock);
spin_lock_init(&bat_priv->tt_ghash_lock);
spin_lock_init(&bat_priv->tt_changes_list_lock);
spin_lock_init(&bat_priv->tt_req_list_lock);
spin_lock_init(&bat_priv->tt_roam_list_lock);
Expand Down
2 changes: 0 additions & 2 deletions net/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ static void update_transtable(struct bat_priv *bat_priv,
/* Even if we received the crc into the OGM, we prefer
* to recompute it to spot any possible inconsistency
* in the global table */
spin_lock_bh(&bat_priv->tt_ghash_lock);
orig_node->tt_crc = tt_global_crc(bat_priv, orig_node);
spin_unlock_bh(&bat_priv->tt_ghash_lock);
/* Roaming phase is over: tables are in sync again. I can
* unset the flag */
orig_node->tt_poss_change = false;
Expand Down
Loading

0 comments on commit 7683fdc

Please sign in to comment.