Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, arvid.brodin@alten.se, alex.aring@gmail.com,
	linux-wpan@vger.kernel.org,
	Dmitry Tarnyagin <abi.dmitryt@gmail.com>
Subject: Re: [PATCH net 1/2] caif: remove wrong dev_net_set() call
Date: Wed, 28 Jan 2015 16:07:02 +0100	[thread overview]
Message-ID: <54C8FB16.6040006@6wind.com> (raw)
In-Reply-To: <1422307694-10079-2-git-send-email-nicolas.dichtel@6wind.com>

Removing bouncing email addresses (dmitry.tarnyagin@lockless.no and
sjur.brandeland@stericsson.com)
CC: Dmitry Tarnyagin <abi.dmitryt@gmail.com>

Dmitry, please also have a look to
http://permalink.gmane.org/gmane.linux.network/347942


Thank you,
Nicolas

Le 26/01/2015 22:28, Nicolas Dichtel a écrit :
> src_net points to the netns where the netlink message has been received. This
> netns may be different from the netns where the interface is created (because
> the user may add IFLA_NET_NS_[PID|FD]). In this case, src_net is the link netns.
>
> It seems wrong to override the netns in the newlink() handler because if it
> was not already src_net, it means that the user explicitly asks to create the
> netdevice in another netns.
>
> CC: Sjur Brændeland <sjur.brandeland@stericsson.com>
> CC: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
> Fixes: 8391c4aab1aa ("caif: Bugfixes in CAIF netdevice for close and flow control")
> Fixes: c41254006377 ("caif-hsi: Add rtnl support")
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
>   drivers/net/caif/caif_hsi.c | 1 -
>   net/caif/chnl_net.c         | 1 -
>   2 files changed, 2 deletions(-)
>
> diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
> index 5e40a8b68cbe..b3b922adc0e4 100644
> --- a/drivers/net/caif/caif_hsi.c
> +++ b/drivers/net/caif/caif_hsi.c
> @@ -1415,7 +1415,6 @@ static int caif_hsi_newlink(struct net *src_net, struct net_device *dev,
>
>   	cfhsi = netdev_priv(dev);
>   	cfhsi_netlink_parms(data, cfhsi);
> -	dev_net_set(cfhsi->ndev, src_net);
>
>   	get_ops = symbol_get(cfhsi_get_ops);
>   	if (!get_ops) {
> diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
> index 4589ff67bfa9..67a4a36febd1 100644
> --- a/net/caif/chnl_net.c
> +++ b/net/caif/chnl_net.c
> @@ -470,7 +470,6 @@ static int ipcaif_newlink(struct net *src_net, struct net_device *dev,
>   	ASSERT_RTNL();
>   	caifdev = netdev_priv(dev);
>   	caif_netlink_parms(data, &caifdev->conn_req);
> -	dev_net_set(caifdev->netdev, src_net);
>
>   	ret = register_netdevice(dev);
>   	if (ret)
>


  parent reply	other threads:[~2015-01-28 20:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 21:28 [PATCH net 0/2] netns: audit netdevice creation with IFLA_NET_NS_[PID|FD] Nicolas Dichtel
2015-01-26 21:28 ` [PATCH net 1/2] caif: remove wrong dev_net_set() call Nicolas Dichtel
2015-01-27 11:34   ` Nicolas Dichtel
2015-01-27 12:41     ` Bjørn Mork
2015-01-27 12:50       ` Nicolas Dichtel
2015-01-28 15:07   ` Nicolas Dichtel [this message]
2015-01-26 21:28 ` [PATCH net 2/2] vxlan: setup the right link netns in newlink hdlr Nicolas Dichtel
2015-01-27  9:34 ` [PATCH net 0/2] netns: audit netdevice creation with IFLA_NET_NS_[PID|FD] Alexander Aring
2015-01-27 10:32   ` Nicolas Dichtel
2015-01-27 12:23     ` Alexander Aring
2015-01-27 12:51       ` Alexander Aring
2015-01-27 13:28       ` Nicolas Dichtel
2015-01-27 14:06         ` Alexander Aring
2015-01-27 14:50           ` Nicolas Dichtel
2015-01-27 20:26             ` Alexander Aring
2015-01-28  9:37               ` Nicolas Dichtel
2015-01-29 22:20 ` David Miller
2015-01-30 20:00 ` Arvid Brodin
2015-02-02 15:58   ` Nicolas Dichtel
2015-02-04 20:33     ` Arvid Brodin
2015-02-05 14:34       ` Nicolas Dichtel

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=54C8FB16.6040006@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=abi.dmitryt@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=arvid.brodin@alten.se \
    --cc=davem@davemloft.net \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox