batman-adv: Make bat_priv->curr_gw an rcu protected pointer
authorLinus Lüssing <linus.luessing@ascom.ch>
Sun, 13 Feb 2011 21:13:02 +0000 (21:13 +0000)
committerMarek Lindner <lindner_marek@yahoo.de>
Sat, 5 Mar 2011 11:50:10 +0000 (12:50 +0100)
The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the bat_priv->curr_gw need to be used, as well as spin/rcu locking.

Otherwise we might end up using a curr_gw pointer pointing to already
freed memory.

Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>

No differences found