lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54C8FB16.6040006@6wind.com>
Date:	Wed, 28 Jan 2015 16:07:02 +0100
From:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:	netdev@...r.kernel.org
CC:	davem@...emloft.net, arvid.brodin@...en.se, alex.aring@...il.com,
	linux-wpan@...r.kernel.org,
	Dmitry Tarnyagin <abi.dmitryt@...il.com>
Subject: Re: [PATCH net 1/2] caif: remove wrong dev_net_set() call

Removing bouncing email addresses (dmitry.tarnyagin@...kless.no and
sjur.brandeland@...ricsson.com)
CC: Dmitry Tarnyagin <abi.dmitryt@...il.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@...ricsson.com>
> CC: Dmitry Tarnyagin <dmitry.tarnyagin@...kless.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@...nd.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)
>

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ