Received: by 10.223.185.111 with SMTP id b44csp1072440wrg; Fri, 9 Mar 2018 20:54:46 -0800 (PST) X-Google-Smtp-Source: AG47ELsY8odFqo5RujN2l4njpJJfzCY5ip0s3XcLBwhHqRDB0afCNTuwgR3j4ffG91Baj8CYjQXc X-Received: by 10.99.126.19 with SMTP id z19mr797615pgc.108.1520657686107; Fri, 09 Mar 2018 20:54:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520657686; cv=none; d=google.com; s=arc-20160816; b=CdDanESg2qE4JfRXs5lEFAXgMXGFHdg85HpH/aQ0bBMZjumUHkip0jtc66a/OiUCWn IK2HoqtGIiXcN0M2dhC0aQca57bE/RHbpj5NiFKv4MK8k3H9DjtyYhtx2Gv67kTlxiDf PYF90oN/4JukDOWFoYrkGkeS0L8+2ZhnH/knKtkYjejI5+OWmYxXVu4SRN/L9f3PdPqE sbdmJhLyTuWFfC8i5ursP+va2siTBQf4KLcBOnhCW124iF/nppQubbWm64FqWWyZ/Xa5 CQ1Mnpv6tayRtBw14gXrvrgbvTs/5F4VVPov5ZzTpcIpEFEHSBSQiyAnAgryRGb9Fay5 v1Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=SlFjr/XQtbwD2YwqsAdzwAHWSsnv6OmTH29vdtlJcxM=; b=EJplvC/SbPQHG5poJ44qPRB/3Cf1b7UiSNMoquysBKohAFO96xFmRu/akiZXGyDEvc AZN43E3ZaIf3Zl3Z+v8mvQZp/Ulf619qTfwebIFq0Y7KzGdKZnXifjosKV+Q16/eD8HX k6CMVGcJdGTzANi+FiXE2WfG7FEvD0P7Blac4mTL6HeNmgH5XYTpnPCVukB05I9Q6k6f 6T8UgV2gMsbpDzaOviqX0EKFogKU1sSihHDBfZPb2hQiMLYJeV7jj0743eXazj3xrXoi emb0Yb+0n/MQCBiUS2Ghq46u4Ck/rxaNgx5MDNdCWu3FUz0aayevCsoZSG35CRthC24Q ItWA== 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 s65si1868833pgb.95.2018.03.09.20.54.31; Fri, 09 Mar 2018 20:54:46 -0800 (PST) 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 S932915AbeCJExf convert rfc822-to-8bit (ORCPT + 99 others); Fri, 9 Mar 2018 23:53:35 -0500 Received: from mga02.intel.com ([134.134.136.20]:64931 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932189AbeCJExd (ORCPT ); Fri, 9 Mar 2018 23:53:33 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2018 20:53:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,449,1515484800"; d="scan'208";a="40742564" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga002.jf.intel.com with ESMTP; 09 Mar 2018 20:53:32 -0800 Received: from orsmsx155.amr.corp.intel.com (10.22.240.21) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 9 Mar 2018 20:53:32 -0800 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.72]) by ORSMSX155.amr.corp.intel.com ([169.254.7.73]) with mapi id 14.03.0319.002; Fri, 9 Mar 2018 20:53:32 -0800 From: "Brown, Aaron F" To: Benjamin Poirier , "Kirsher, Jeffrey T" CC: Alexander Duyck , Lennart Sorensen , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 2/2] e1000e: Fix link check race condition Thread-Topic: [PATCH 2/2] e1000e: Fix link check race condition Thread-Index: AQHTtO5oYz5spVXvZkqQ2Wbb2ru4kaPI7W0g Date: Sat, 10 Mar 2018 04:53:31 +0000 Message-ID: <309B89C4C689E141A5FF6A0C5FB2118B8C801AC3@ORSMSX101.amr.corp.intel.com> References: <20180306015553.10441-1-bpoirier@suse.com> <20180306015553.10441-2-bpoirier@suse.com> In-Reply-To: <20180306015553.10441-2-bpoirier@suse.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: netdev-owner@vger.kernel.org [mailto:netdev- > owner@vger.kernel.org] On Behalf Of Benjamin Poirier > Sent: Monday, March 5, 2018 5:56 PM > To: Kirsher, Jeffrey T > Cc: Alexander Duyck ; Lennart Sorensen > ; intel-wired-lan@lists.osuosl.org; > netdev@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [PATCH 2/2] e1000e: Fix link check race condition > > Alex reported the following race condition: > > /* link goes up... interrupt... schedule watchdog */ > \ e1000_watchdog_task > \ e1000e_has_link > \ hw->mac.ops.check_for_link() === > e1000e_check_for_copper_link > \ e1000e_phy_has_link_generic(..., &link) > link = true > > /* link goes down... interrupt */ > \ e1000_msix_other > hw->mac.get_link_status = > true > > /* link is up */ > mac->get_link_status = false > > link_active = true > /* link_active is true, wrongly, and stays so because > * get_link_status is false */ > > Avoid this problem by making sure that we don't set get_link_status = false > after having checked the link. > > It seems this problem has been present since the introduction of e1000e. > > Link: https://lkml.org/lkml/2018/1/29/338 > Reported-by: Alexander Duyck > Signed-off-by: Benjamin Poirier > --- > drivers/net/ethernet/intel/e1000e/ich8lan.c | 31 ++++++++++++++++------- > ------ > drivers/net/ethernet/intel/e1000e/mac.c | 14 ++++++------- > 2 files changed, 24 insertions(+), 21 deletions(-) Tested-by: Aaron Brown