]> git.proxmox.com Git - mirror_ubuntu-disco-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)
commit32ae9b221e788413ce68feaae2ca39e406211a0a
treed827f989976a28fea5cdcb349c308baa98182c35
parent71e4aa9c465fd66c110667ab5d620fb6a4ef2157
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