]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Modify neigh_list only with rcu-list functions
authorSven Eckelmann <sven.eckelmann@open-mesh.com>
Thu, 29 Sep 2016 15:22:58 +0000 (17:22 +0200)
committerSimon Wunderlich <sw@simonwunderlich.de>
Mon, 17 Oct 2016 14:10:53 +0000 (16:10 +0200)
commitbe5509a04b4e82a3e1816548e68db38656aed68e
tree3bb060702d0fa1d2067c224cf3319d0a9b276607
parente2dfe2e7e1959f95c02ad2affb59422ef1e88bf4
batman-adv: Modify neigh_list only with rcu-list functions

The batadv_hard_iface::neigh_list is accessed via rcu based primitives.
Thus all operations done on it have to fulfill the requirements by RCU. So
using non-RCU mechanisms like hlist_add_head is not allowed because it
misses the barriers required to protect concurrent readers when accessing
the data behind the pointer.

Fixes: aeb91a31fb9b ("batman-adv: add list of unique single hop neighbors per hard-interface")
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/originator.c