* Patch "batman-adv: Modify neigh_list only with rcu-list functions" has been added to the 4.8-stable tree
@ 2016-11-17 9:04 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-11-17 9:04 UTC (permalink / raw)
To: sven.eckelmann, gregkh, linus.luessing, sw; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
batman-adv: Modify neigh_list only with rcu-list functions
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
batman-adv-modify-neigh_list-only-with-rcu-list-functions.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 9ca488dd53088d4fcc97258aeeccf21f63b7da1e Mon Sep 17 00:00:00 2001
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Thu, 29 Sep 2016 17:22:58 +0200
Subject: batman-adv: Modify neigh_list only with rcu-list functions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
commit 9ca488dd53088d4fcc97258aeeccf21f63b7da1e upstream.
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: cef63419f7db ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/originator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -537,7 +537,7 @@ batadv_hardif_neigh_create(struct batadv
if (bat_priv->algo_ops->neigh.hardif_init)
bat_priv->algo_ops->neigh.hardif_init(hardif_neigh);
- hlist_add_head(&hardif_neigh->list, &hard_iface->neigh_list);
+ hlist_add_head_rcu(&hardif_neigh->list, &hard_iface->neigh_list);
out:
spin_unlock_bh(&hard_iface->neigh_list_lock);
Patches currently in stable-queue which might be from sven.eckelmann@open-mesh.com are
queue-4.8/batman-adv-modify-neigh_list-only-with-rcu-list-functions.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-17 9:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 9:04 Patch "batman-adv: Modify neigh_list only with rcu-list functions" has been added to the 4.8-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).