tmp_suning_uos_patched/net/batman-adv
Sven Eckelmann 1181e1daac batman-adv: Make vis info stack traversal threadsafe
The batman-adv vis server has to a stack which stores all information
about packets which should be send later. This stack is protected
with a spinlock that is used to prevent concurrent write access to it.

The send_vis_packets function has to take all elements from the stack
and send them to other hosts over the primary interface. The send will
be initiated without the lock which protects the stack.

The implementation using list_for_each_entry_safe has the problem that
it stores the next element as "safe ptr" to allow the deletion of the
current element in the list. The list may be modified during the
unlock/lock pair in the loop body which may make the safe pointer
not pointing to correct next element.

It is safer to remove and use the first element from the stack until no
elements are available. This does not need reduntant information which
would have to be validated each time the lock was removed.

Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-01-30 10:32:08 +01:00
..
aggregation.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
aggregation.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bat_debugfs.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bat_debugfs.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bat_sysfs.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bat_sysfs.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bitarray.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
bitarray.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
gateway_client.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
gateway_client.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
gateway_common.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
gateway_common.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
hard-interface.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
hard-interface.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
hash.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
hash.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
icmp_socket.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
icmp_socket.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
Kconfig net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
main.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
main.h batman-adv: Use "__attribute__" shortcut macros 2011-01-16 03:25:19 +01:00
Makefile net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
originator.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
originator.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
packet.h batman-adv: Use "__attribute__" shortcut macros 2011-01-16 03:25:19 +01:00
ring_buffer.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
ring_buffer.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
routing.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
routing.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
send.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
send.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
soft-interface.c net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
soft-interface.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
translation-table.c batman-adv: Return hna count on local buffer fill 2010-12-20 10:32:03 -08:00
translation-table.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
types.h batman-adv: Use "__attribute__" shortcut macros 2011-01-16 03:25:19 +01:00
unicast.c batman-adv: Even Batman should not dereference NULL pointers 2011-01-13 22:11:12 +01:00
unicast.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00
vis.c batman-adv: Make vis info stack traversal threadsafe 2011-01-30 10:32:08 +01:00
vis.h net: Add batman-adv meshing protocol 2010-12-16 13:44:24 -08:00