batman-adv: Make orig_node->router an rcu protected pointer
The rcu protected macros rcu_dereference() and rcu_assign_pointer() for the orig_node->router need to be used, as well as spin/rcu locking. Otherwise we might end up using a router pointer pointing to already freed memory. Therefore this commit introduces the safe getter method orig_node_get_router(). Signed-off-by:Linus Lüssing <linus.luessing@web.de> Signed-off-by:
Marek Lindner <lindner_marek@yahoo.de> Signed-off-by:
Sven Eckelmann <sven@narfation.org>
Showing
- net/batman-adv/gateway_client.c 48 additions, 32 deletionsnet/batman-adv/gateway_client.c
- net/batman-adv/icmp_socket.c 3 additions, 15 deletionsnet/batman-adv/icmp_socket.c
- net/batman-adv/originator.c 28 additions, 9 deletionsnet/batman-adv/originator.c
- net/batman-adv/originator.h 1 addition, 0 deletionsnet/batman-adv/originator.h
- net/batman-adv/routing.c 93 additions, 101 deletionsnet/batman-adv/routing.c
- net/batman-adv/send.c 12 additions, 7 deletionsnet/batman-adv/send.c
- net/batman-adv/types.h 2 additions, 2 deletionsnet/batman-adv/types.h
- net/batman-adv/vis.c 45 additions, 46 deletionsnet/batman-adv/vis.c
Please register or sign in to comment