batman-adv: Correct rcu refcounting for orig_node
authorMarek Lindner <lindner_marek@yahoo.de>
Fri, 18 Feb 2011 12:28:10 +0000 (12:28 +0000)
committerMarek Lindner <lindner_marek@yahoo.de>
Sat, 5 Mar 2011 11:52:01 +0000 (12:52 +0100)
commit7b36e8eef989fc59535b4f1d3fc0f83afaf419d4
treef0900101542966e0655ca5f115b5b0bc409b1e74
parent7aadf889e897155c45cda230d2a6701ad1fbff61
batman-adv: Correct rcu refcounting for orig_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/gateway_client.c
net/batman-adv/icmp_socket.c
net/batman-adv/originator.c
net/batman-adv/originator.h
net/batman-adv/routing.c
net/batman-adv/translation-table.c
net/batman-adv/types.h
net/batman-adv/unicast.c
net/batman-adv/vis.c