Received: by 10.223.185.116 with SMTP id b49csp3903748wrg; Tue, 6 Mar 2018 06:55:44 -0800 (PST) X-Google-Smtp-Source: AG47ELunMLhFee1FQFQhiiIjxzJ7Ovw28UyFbKMfWgQWinTpDNQKzsJT9CpQzdY+JTs89opGmYnY X-Received: by 10.99.44.22 with SMTP id s22mr15420457pgs.111.1520348144036; Tue, 06 Mar 2018 06:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520348144; cv=none; d=google.com; s=arc-20160816; b=1AzRDXOsRzWDn60B/zWkjKS4geFynB2MYZGh72/6GG+rZmd3FoaBlsWXaW90HaYKbf Htbamdd6AXmR6+WEci9QoVW/zHB49Qv163lEAbSFi0HmrdGJOV7wojI0xCVk8alsRukm r396yfwmptEwgQNAmaOXSnyQet/Kh05HKmJwca7oQbGT1TVqZnrMkgnAjMfP4fmgXhci NO8ppXpfrVlYPJERtrQ/iQydVctBqjaHiF5Otst1fbeBMe+9wjjCfbOd+fLq6N5cKxNV ATrAyQmcPHEltWIjrfeeQSyN8ZDn6WFyDWo6/DZy1/jf4nM2sqzFdvRIPqgERrRmoFpF rzyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=5lvyVxlCOH9VSPy0C9HhE68xxg8mhse5KIvuPSfM06M=; b=LzAE1M7UET7K7XLTZbm5Nq2R4aHGMwbbo2qeEoVsRErgVlgRYkvhC/LnfR47M8idR4 OLJCcKT2Fq25gch/fYBlqxKq+N3uLuhz2DVjqtvih3/y+Ng+/owrxRQz5BLt61Zd9W99 W5pJoPkqJPcB6i+tyzAoSGB/ICJovUYlccRbryYOwY5bT9WoXH+Utl+SDQMm5yzSTYO+ 6hVjtpOJqzc/i9qai0FY0dUn9F/oM7WaUfLzsftvqPqblbW8CLIv0WPMwSDcCuu9s/cv evskGt6Fh6s7DUwcDth3KlI3T72xcVlIVTAcvTbSC8sW0ovgvx1BijVMU8VAnx5QNvV3 deBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TZDqudD0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n68si9917502pga.524.2018.03.06.06.55.29; Tue, 06 Mar 2018 06:55:44 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TZDqudD0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932589AbeCFOye (ORCPT + 99 others); Tue, 6 Mar 2018 09:54:34 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:46446 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbeCFOyc (ORCPT ); Tue, 6 Mar 2018 09:54:32 -0500 Received: by mail-qk0-f193.google.com with SMTP id 130so25098305qkd.13; Tue, 06 Mar 2018 06:54:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5lvyVxlCOH9VSPy0C9HhE68xxg8mhse5KIvuPSfM06M=; b=TZDqudD0zQDQMmKeueLYp8OfUv3XPWcSZrRCl/ATG48SRRQt7q3UYZBUSKH3415XlR 2NCw7miXktt++e33tE5m9dkAiF5G8nApOmqp+8EKHlW/xw2Z6gKlYm89n41IOheVksfp YBVGKaNA60rhhiJmzGmgXeFA/Wv5Ne4UteD3ScbGIRvIvj5cFtxls3YuWuNzAq7LHujU KqXEoY/GCto6+0KmmbvD2ACkzwLP+guPd7RluR3eE8IH0xy484XiGMgB9HGove5+YCB+ U8dnZqQYnQwywPZt+CARPiTk6UQpfQ9WW3EPSIV+8Zp/r1gccPsgXLe5tXcZaAN7C3s7 53ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5lvyVxlCOH9VSPy0C9HhE68xxg8mhse5KIvuPSfM06M=; b=KlRQDLFLfdO9D0bDGhuTphgs0q1FbGs8AlOMeA3IyimOXqEQsGFaym48znc/Z14Qmt jf5Ek2jL7XBftQ4tOEGqnxU/+o5ROZkN05Q5BD0BNdhHezoW/9WZf/qOsRkbB/CjAVq5 tzlMpaG8VAacRjrbLLnh9qP+svIGDU8C0+oyp4V9Wtmwl6cyCyg9EeEZvmF471ZKHdPH X5nQzOySW9aCNzjzEt6fJ3jqbZj0kTlKsjNLBRoHcCo4T0IvMUk9mTIc2X6H+64oeqI/ hEWWpVU7TUVzevm2zrIt6oW94FX9dnf4pyd35S5zt7RzuG/f1Q59Mg4a9BzEbvAuXI2y LDtg== X-Gm-Message-State: AElRT7EOamw+pT0n/qUj8zMHFHuq9pH3PqVVyXgVy1ZBhZkm1XIwaole c4GBW9UPeG+ocJbBA6X9N9QE/6RaxC0/TQqSl9U= X-Received: by 10.55.21.139 with SMTP id 11mr19098104qkv.127.1520348040688; Tue, 06 Mar 2018 06:54:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.89.138 with HTTP; Tue, 6 Mar 2018 06:53:59 -0800 (PST) In-Reply-To: <20180306015553.10441-2-bpoirier@suse.com> References: <20180306015553.10441-1-bpoirier@suse.com> <20180306015553.10441-2-bpoirier@suse.com> From: Alexander Duyck Date: Tue, 6 Mar 2018 06:53:59 -0800 Message-ID: Subject: Re: [PATCH 2/2] e1000e: Fix link check race condition To: Benjamin Poirier Cc: Jeff Kirsher , Lennart Sorensen , intel-wired-lan , Netdev , LKML 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 On Mon, Mar 5, 2018 at 5:55 PM, Benjamin Poirier wrote: > 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 Looks good. Thanks. Acked-by: Alexander Duyck