aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/originator.h
Commit message (Collapse)AuthorAgeFilesLines
* batman-adv: Make orig_node->router an rcu protected pointerLinus Lüssing2011-04-171-0/+1
| | | | | | | | | | | | | | 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>
* batman-adv: rename batman_if struct to hard_ifaceMarek Lindner2011-03-051-3/+3
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Correct rcu refcounting for orig_nodeMarek Lindner2011-03-051-2/+4
| | | | | | | | | | | 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>
* batman-adv: remove extra layer between hash and hash element - hash bucketMarek Lindner2011-03-051-1/+34
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Correct rcu refcounting for neigh_nodeMarek Lindner2011-03-051-2/+1
| | | | | | | | | | | 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>
* batman-adv: protect bonding with rcu locksSimon Wunderlich2011-03-051-0/+1
| | | | | | | | | | bonding / alternating candidates need to be secured by rcu locks as well. This patch therefore converts the bonding list from a plain pointer list to a rcu securable lists and references the bonding candidates. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect originator nodes with reference countersMarek Lindner2011-03-051-0/+1
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect neighbor nodes with reference countersMarek Lindner2011-03-051-3/+5
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Update copyright yearsSven Eckelmann2011-01-311-1/+1
| | | | Signed-off-by: Sven Eckelmann <sven@narfation.org>
* net: Add batman-adv meshing protocolSven Eckelmann2010-12-161-0/+64
B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing protocol for multi-hop ad-hoc mesh networks. The networks may be wired or wireless. See http://www.open-mesh.org/ for more information and user space tools. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: David S. Miller <davem@davemloft.net>