All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: git.user@gmail.com
Cc: netdev@vger.kernel.org, vfalico@redhat.com
Subject: Re: [PATCH] net: prevent of emerging cross-namespace symlinks
Date: Sun, 24 Aug 2014 18:28:42 -0700 (PDT)	[thread overview]
Message-ID: <20140824.182842.1083967994418672720.davem@davemloft.net> (raw)
In-Reply-To: <1408749310-28622-1-git-send-email-git.user@gmail.com>

From: "Alexander Y. Fomichev" <git.user@gmail.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@gmail.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.

  reply	other threads:[~2014-08-25  1:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21 10:38 Is it normal to have cross namespace symlinks? Alexander Y. Fomichev
2014-08-21 12:12 ` Veaceslav Falico
2014-08-21 15:13   ` Alexander Y. Fomichev
2014-08-21 15:29     ` Veaceslav Falico
2014-08-22  8:53       ` [PATCH] netdev_adjacent_sysfs_*: fix cross-namespace symlinks Alexander Y. Fomichev
2014-08-22 10:34       ` Alexander Y. Fomichev
2014-08-22 18:30         ` David Miller
2014-08-22 23:15           ` [PATCH] net: prevent of emerging " Alexander Y. Fomichev
2014-08-25  1:28             ` David Miller [this message]
2014-08-25 12:06               ` Alexander Y. Fomichev
2014-08-25 12:39                 ` Alexander Y. Fomichev
2014-08-25 12:26               ` Alexander Y. Fomichev
2014-08-25 22:18                 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140824.182842.1083967994418672720.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=git.user@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.