The following commit has been merged in the master branch: commit 76eab023092bdb4d74aed878bba3d55a95e9f8a3 Author: Sven Eckelmann sven@narfation.org Date: Fri Apr 1 08:49:19 2011 +0200
batman-adv: Fix imbalanced locking in gw_node_update
8ffdea813e32cee3c60be36fb9e6a5e077e51ea0 used rcu_read_unlock without using rcu_read_lock when gw_get_selected_gw_node didn't return a valid gw_node.
Signed-off-by: Sven Eckelmann sven@narfation.org
diff --git a/gateway_client.c b/gateway_client.c index 3d0050b..2acd7a6 100644 --- a/gateway_client.c +++ b/gateway_client.c @@ -337,19 +337,20 @@ void gw_node_update(struct bat_priv *bat_priv, goto deselect; }
- goto out; + goto unlock; }
if (new_gwflags == 0) - goto out; + goto unlock;
gw_node_add(bat_priv, orig_node, new_gwflags); - goto out; + goto unlock;
deselect: gw_deselect(bat_priv); -out: +unlock: rcu_read_unlock(); +out: if (curr_gw) gw_node_free_ref(curr_gw); }