]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: fix creation adjacent device symlinks
authorAlexander Y. Fomichev <git.user@gmail.com>
Mon, 15 Sep 2014 10:22:35 +0000 (14:22 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Jan 2015 16:18:59 +0000 (08:18 -0800)
commit7cc4382590a1b2fca9433d84967f0373405fc307
tree67127c0a1bf0f04e8e49809c59e7a55f5c1323f8
parent565318483e521ee292e9e1c74dba169481b631bf
net: fix creation adjacent device symlinks

commit 7ce64c79c4decdeb1afe0bf2f6ef834b382871d1 upstream.

__netdev_adjacent_dev_insert may add adjust device of different net
namespace, without proper check it leads to emergence of broken
sysfs links from/to devices in another namespace.
Fix: rewrite netdev_adjacent_is_neigh_list macro as a function,
     move net_eq check into netdev_adjacent_is_neigh_list.
     (thanks David)
     related to: 4c75431ac3520631f1d9e74aa88407e6374dbbc4

Signed-off-by: Alexander Fomichev <git.user@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Miquel van Smoorenburg <mikevs@xs4all.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/dev.c