[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140824.182842.1083967994418672720.davem@davemloft.net>
Date: Sun, 24 Aug 2014 18:28:42 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: git.user@...il.com
Cc: netdev@...r.kernel.org, vfalico@...hat.com
Subject: Re: [PATCH] net: prevent of emerging cross-namespace symlinks
From: "Alexander Y. Fomichev" <git.user@...il.com>
Date: Sat, 23 Aug 2014 03:15:10 +0400
> 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 <git.user@...il.com>
...
> - if (netdev_adjacent_is_neigh_list(dev, dev_list))
> + if (netdev_adjacent_is_neigh_list(dev, dev_list) &&
> + net_eq(dev_net(dev),dev_net(adj_dev)))
Please indent this properly.
For a multi-line conditional, the second and subsequent lines
should begin exactly at the first column after the openning
parenthesis of the first line.
You must use the appropriate number of TAB and SPACE characters
necessary to do so.
Thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists