Received: by 10.192.165.148 with SMTP id m20csp786820imm; Fri, 27 Apr 2018 07:30:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr52c22IVwhjUHHJUtrkUQE9LbUOaj4GPOsNLChTpCSB8sLdfvpOxq+RFHRwvP+ByhHItgv X-Received: by 10.98.238.3 with SMTP id e3mr2431698pfi.232.1524839459324; Fri, 27 Apr 2018 07:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524839459; cv=none; d=google.com; s=arc-20160816; b=KEu02UFfRDyVdENolfbsMZ02ptuvi6P2cZONYew6qXhWL9WhDllPA7aaMeu9XFqu+o S4deqeLAYKaXiB1QvU0hPAPslnTbnbXS3tG0GUMJ8bVe7sYsVF5D2cmMd0xauVzJZXnU qpHFQ9+ZnYIoBJpVfJdqCub+ejKvbVCPDuh3KS0RueMyukHkBsByJ6/g+avjUPLpOHBQ q58uDTklP0wRBjSZcL5AfwM7ywhAu+bXPf+JcpzdPcfwNRxTrOdcq3Q3Af+olfz1uhGS 5DN001id7d/srprjN2uwtYxRnQQmd3Xm8mdKde65g7lRhyImP2AErZO9kcOVjuhiS/3M e2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=2zhiM/F4fA4NVQrmPt7YBMDn88HDEBHtYReeSR2Frwg=; b=zPCyegT+sBvPDD978L2Xp+s9fF+QO16+VXCtptv1X3DjRoo+WghSiWNnmOIizV4xxK zhYReSyQuPS1Lwow5soMybkcHT62qFnpDs5rWNHMRjO6nk0zxT+TRrgxawceRtPfKhOY ElEmECTBal0DIGw1nO8ezzzHDgA4PWjVxL9MKM/IN3QcSYXJi+X0F6GLmwDVOFWgOEfa 4kGHvaLFScszwX9bEY6iNmz12goG0SbQB/WasYSxlAWUYZRA6bRhbpe8eyWoSKtYRQFx X47B63Yn+O+c9A3/V0w7pPbng45aN+eDLkz1zM++bFjY0K/uOBD9mc3eraf7mRtywq5m F4yQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a66si122057pfb.81.2018.04.27.07.30.44; Fri, 27 Apr 2018 07:30:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934942AbeD0OLE (ORCPT + 99 others); Fri, 27 Apr 2018 10:11:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:55946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934466AbeD0OLA (ORCPT ); Fri, 27 Apr 2018 10:11:00 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1808218A1; Fri, 27 Apr 2018 14:10:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1808218A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xin Long , "David S. Miller" Subject: [PATCH 4.16 08/81] bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave Date: Fri, 27 Apr 2018 15:58:10 +0200 Message-Id: <20180427135743.710353486@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135743.216853156@linuxfoundation.org> References: <20180427135743.216853156@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xin Long [ Upstream commit ddea788c63094f7c483783265563dd5b50052e28 ] After Commit 8a8efa22f51b ("bonding: sync netpoll code with bridge"), it would set slave_dev npinfo in slave_enable_netpoll when enslaving a dev if bond->dev->npinfo was set. However now slave_dev npinfo is set with bond->dev->npinfo before calling slave_enable_netpoll. With slave_dev npinfo set, __netpoll_setup called in slave_enable_netpoll will not call slave dev's .ndo_netpoll_setup(). It causes that the lower dev of this slave dev can't set its npinfo. One way to reproduce it: # modprobe bonding # brctl addbr br0 # brctl addif br0 eth1 # ifconfig bond0 192.168.122.1/24 up # ifenslave bond0 eth2 # systemctl restart netconsole # ifenslave bond0 br0 # ifconfig eth2 down # systemctl restart netconsole The netpoll won't really work. This patch is to remove that slave_dev npinfo setting in bond_enslave(). Fixes: 8a8efa22f51b ("bonding: sync netpoll code with bridge") Signed-off-by: Xin Long Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/bonding/bond_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1660,8 +1660,7 @@ int bond_enslave(struct net_device *bond } /* switch(bond_mode) */ #ifdef CONFIG_NET_POLL_CONTROLLER - slave_dev->npinfo = bond->dev->npinfo; - if (slave_dev->npinfo) { + if (bond->dev->npinfo) { if (slave_enable_netpoll(new_slave)) { netdev_info(bond_dev, "master_dev is using netpoll, but new slave device does not support netpoll\n"); res = -EBUSY;