Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933567AbbDII5Q (ORCPT ); Thu, 9 Apr 2015 04:57:16 -0400 Received: from mail.kernel.org ([198.145.29.136]:43351 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933529AbbDII5E (ORCPT ); Thu, 9 Apr 2015 04:57:04 -0400 From: lizf@kernel.org To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nicolas Dichtel , =?UTF-8?q?Sjur=20Br=C3=A6ndeland?= , Dmitry Tarnyagin , "David S. Miller" , Zefan Li Subject: [PATCH 3.4 141/176] caif: remove wrong dev_net_set() call Date: Thu, 9 Apr 2015 16:46:29 +0800 Message-Id: <1428569224-23820-141-git-send-email-lizf@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1428569028-23762-1-git-send-email-lizf@kernel.org> References: <1428569028-23762-1-git-send-email-lizf@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1831 Lines: 49 From: Nicolas Dichtel 3.4.107-rc1 review patch. If anyone has any objections, please let me know. ------------------ commit 8997c27ec41127bf57421cc0205413d525421ddc upstream. 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 CC: Dmitry Tarnyagin Fixes: 8391c4aab1aa ("caif: Bugfixes in CAIF netdevice for close and flow control") Fixes: c41254006377 ("caif-hsi: Add rtnl support") Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller [lizf: Backported to 3.4: drop the change to drivers/net/caif/caif_hsi.c] Signed-off-by: Zefan Li --- net/caif/chnl_net.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index d09340e..b8d9403 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c @@ -467,7 +467,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) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/