From: Alexander Y. Fomichev Date: Mon, 25 Aug 2014 12:26:45 +0000 (+0400) Subject: net: prevent of emerging cross-namespace symlinks X-Git-Tag: fixes-for-v3.18-merge-window~162^2~52 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c75431ac3520631f1d9e74aa88407e6374dbbc4;p=pandora-kernel.git net: prevent of emerging cross-namespace symlinks Code manipulating sysfs symlinks on adjacent net_devices(s) currently doesn't take into account that devices potentially belong to different namespaces. This patch trying to fix an issue as follows: - check for net_ns before creating / deleting symlink. for now only netdev_adjacent_rename_links and __netdev_adjacent_dev_remove are affected, afaics __netdev_adjacent_dev_insert implies both net_devs belong to the same namespace. - Drop all existing symlinks to / from all adj_devs before switching namespace and recreate them just after. Signed-off-by: Alexander Y. Fomichev Signed-off-by: David S. Miller --- Reading git-diff-tree failed