]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Make bat_priv->primary_if an rcu protected pointer
authorMarek Lindner <lindner_marek@yahoo.de>
Wed, 20 Apr 2011 13:40:58 +0000 (15:40 +0200)
committerSven Eckelmann <sven@narfation.org>
Sun, 1 May 2011 20:49:03 +0000 (22:49 +0200)
commit1163fa2e14fd11aa7cf7d65df9ebf1c43de159b1
treed827f989976a28fea5cdcb349c308baa98182c35
parentedaa878d88f33f525f09c5c15cba38773ad21064
batman-adv: Make bat_priv->primary_if an rcu protected pointer

The rcu protected macros rcu_dereference() and rcu_assign_pointer()
for the bat_priv->primary_if need to be used, as well as spin/rcu locking.

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

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 files changed:
net/batman-adv/gateway_client.c
net/batman-adv/hard-interface.c
net/batman-adv/hard-interface.h
net/batman-adv/icmp_socket.c
net/batman-adv/originator.c
net/batman-adv/routing.c
net/batman-adv/send.c
net/batman-adv/soft-interface.c
net/batman-adv/translation-table.c
net/batman-adv/types.h
net/batman-adv/unicast.c
net/batman-adv/vis.c