Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1769826imm; Thu, 27 Sep 2018 02:09:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV62QbJxm+kfwF0snGPgXSVGBvNC1xy+eQRVjKmOQKBS/kOZpeV+aFhbtr8936wgi3Gx0aXZd X-Received: by 2002:a63:ef4f:: with SMTP id c15-v6mr9064497pgk.368.1538039350039; Thu, 27 Sep 2018 02:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039350; cv=none; d=google.com; s=arc-20160816; b=gG/NCeZHe9DnxUpU70a5RgLN1d0Ai8ymedN9Ytg9fi3hAdvqgKa1fNNPoeJKFviaYa 5rRWtgdXGgeQh0bso7CBopJlNzzh4GGB9tDZztgRUzPL958p+NKkfYyBlaxqAOvgvKq7 co/dTRAD6yRLYuWLx++FeMsiO1fjVRK8Q/B9FEM+hvvCAXzuLrmRV+ik9ipaJnjpJ+BY JlZA+NQDzEBKnqkiO5yqmkPdJIsemFZzwLneBvou9c9BInb/0yBp4ZOYDeyTi1VAvUUk H1TkVFLTxyimlDvilxbmSEqu9mtiktiqSrEQnTal/+m4rbpknrHz7th7qZwO0m39fU// 7slw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Cq0tA696ncrz6Vey/SRfpyT3WRpk1h6Bu6w3Cn/A1bk=; b=BPpaWX1JACOPQFPexW/94cy82RNREYRTtZ/HvkSis3qwVctyUWtPFwL0a1LcquN6ds tvMN23CB0KsOXXD8fTpkK6DfezDocnyMyeYZ8lE2OnsCtP6XCapzD9h2Irc4uQmAtVoC zjnzNgMo5h786mOTVCxoaB4+gyHz78qqOTG1DzQttJwya1yr59Tu9g5XG00RUMyLLKc4 aolvJHr7vRpxkez3yTweOLl2m/sHJcCIQwgEYPFWDRjKT+LxF6rSfdX3Go14HnOXrxnH bfY0zFdX7CxlUpES0fkt7J4nrriM16eWFLKnRTVGwiHLXK71fzNhZRpCkgarvad968Ec T1DQ== 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 a143-v6si1548871pfd.241.2018.09.27.02.08.55; Thu, 27 Sep 2018 02:09:10 -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 S1727844AbeI0PZa (ORCPT + 99 others); Thu, 27 Sep 2018 11:25:30 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54934 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727020AbeI0PZa (ORCPT ); Thu, 27 Sep 2018 11:25:30 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 09CB71116; Thu, 27 Sep 2018 09:08:14 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Liam mcbirnie , Roopa Prabhu , "David S. Miller" Subject: [PATCH 4.18 22/88] net: rtnl_configure_link: fix dev flags changes arg to __dev_notify_flags Date: Thu, 27 Sep 2018 11:03:03 +0200 Message-Id: <20180927090303.235199010@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927090300.631426620@linuxfoundation.org> References: <20180927090300.631426620@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Roopa Prabhu [ Upstream commit 56a49d7048703f5ffdb84d3a0ee034108fba6850 ] This fix addresses https://bugzilla.kernel.org/show_bug.cgi?id=201071 Commit 5025f7f7d506 wrongly relied on __dev_change_flags to notify users of dev flag changes in the case when dev->rtnl_link_state = RTNL_LINK_INITIALIZED. Fix it by indicating flag changes explicitly to __dev_notify_flags. Fixes: 5025f7f7d506 ("rtnetlink: add rtnl_link_state check in rtnl_configure_link") Reported-By: Liam mcbirnie Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/core/rtnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2760,7 +2760,7 @@ int rtnl_configure_link(struct net_devic } if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) { - __dev_notify_flags(dev, old_flags, 0U); + __dev_notify_flags(dev, old_flags, (old_flags ^ dev->flags)); } else { dev->rtnl_link_state = RTNL_LINK_INITIALIZED; __dev_notify_flags(dev, old_flags, ~0U);