batman-adv: Correct rcu refcounting for neigh_node
authorMarek Lindner <lindner_marek@yahoo.de>
Thu, 10 Feb 2011 14:33:53 +0000 (14:33 +0000)
committerMarek Lindner <lindner_marek@yahoo.de>
Sat, 5 Mar 2011 11:50:03 +0000 (12:50 +0100)
commit44524fcdf6ca19b58c24f7622c4af1d8d8fe59f8
tree297c76f80d68d56e3c65a23c70de645a1c93df47
parenta4c135c561106c397bae33455acfca4aa8065a30
batman-adv: Correct rcu refcounting for neigh_node

It might be possible that 2 threads access the same data in the same
rcu grace period. The first thread calls call_rcu() to decrement the
refcount and free the data while the second thread increases the
refcount to use the data. To avoid this race condition all refcount
operations have to be atomic.

Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
net/batman-adv/icmp_socket.c
net/batman-adv/originator.c
net/batman-adv/originator.h
net/batman-adv/routing.c
net/batman-adv/types.h
net/batman-adv/unicast.c
net/batman-adv/vis.c