Received: by 10.192.165.148 with SMTP id m20csp808106imm; Fri, 27 Apr 2018 07:51:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZraFkOHQNguvQe5owHog1ydTvbJDVu+zU9jbLZ85laQmcqx7ial9Ka3tPwZUaljAyBBimtf X-Received: by 10.98.237.17 with SMTP id u17mr2503071pfh.78.1524840689063; Fri, 27 Apr 2018 07:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524840689; cv=none; d=google.com; s=arc-20160816; b=jd4uJ0vVpLH92soggkyBdHGsONLzQa0L+6x1JJKhuoXrpRN+tLGhmeoce335lnfpDp 5GZ/4C74X/dfJkAAF/srvcDjjArJIAQrTqoGfkeIM0VLmFXkihUe9z2ELssuTSOkxfXl zDKZhPEVqL4m2k/9IhFGeBV/O5Ilt65HtA6XPshL+6g2eWENE1nflwvZngGQZG4gwhhB xQY67zujrWLvXWt75x9QPv52r64qYux8zCwknCPcWpl9d3YGwRDITAZhrxtcOFCoEl/3 UEj/L8kDu3Fr3Ql3DIThcjcXYw6SygCGIUzLbQHpLsktFTAEez5r35+f3tkiP21upQkE O8nQ== 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=YE61RZceaRl1CZsMAOVzEvKpjA/r539K10Woti8gUAE=; b=ov7xwiMg8cvEORRI0vFRZ/bZkFczHO4WwwpB51Cfl4Rtr2pPRENHQVUmbI7erNPmHB EEwU3pt374A7Df1y4jdN+YPLWzp1n0QaFCZbNdoTZzjJP/Ep09Poq8Q4jp9I1aCL02Fg B0S3K3/zYL5QEopOy2x0BDygtfmRdUu350h+x21hDf2R2pqY9ZPrwD3vCFSoPVaZwNlR h/DT6A5iMOQOLfDIx2fsJYco2tcnFma34mtN8T8LxJnzrhX1iCXEUMwgTmREcGKkWgBy xN/LanqpD9BXkM61P/KiZawWDWv2DNRm1n21lx+rC8SuditTsI7DcTSogq+CfP8731VR nY1g== 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 w11-v6si1326249pgr.489.2018.04.27.07.51.15; Fri, 27 Apr 2018 07:51:29 -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 S934360AbeD0OuM (ORCPT + 99 others); Fri, 27 Apr 2018 10:50:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:53226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934278AbeD0OHX (ORCPT ); Fri, 27 Apr 2018 10:07:23 -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 CB50B218C5; Fri, 27 Apr 2018 14:07:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB50B218C5 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.14 08/80] bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave Date: Fri, 27 Apr 2018 15:58:01 +0200 Message-Id: <20180427135733.364754407@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135732.928644313@linuxfoundation.org> References: <20180427135732.928644313@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.14-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 @@ -1656,8 +1656,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;