]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Sep 2014 18:24:53 +0000 (14:24 -0400)
commit94c39c72e453bb0bb6d2ddc92110501c0334a6d1
tree1a8e5ee8aac0ea6dc17068a61572cdcb98d19cd0
parent8d7390e254634dedf39e4eb13948f8ab07f537bb
net: fix creation adjacent device symlinks

__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: aabd2f7e96c9b04e72d34c9a46097c1a963e3580

Signed-off-by: Alexander Fomichev <git.user@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c