Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2570673imm; Wed, 3 Oct 2018 06:04:25 -0700 (PDT) X-Google-Smtp-Source: ACcGV62eBVwjL8zM1Nn/L5iH6k67gQGTJrdAjvWtXh7XJQIXi0VBtIXmAspbgMnd0Yn0zzNsq9kG X-Received: by 2002:a17:902:710e:: with SMTP id a14-v6mr1574785pll.179.1538571865878; Wed, 03 Oct 2018 06:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538571865; cv=none; d=google.com; s=arc-20160816; b=AfQYxkSTz6phacwJNdYdeCf5lJjGopwD8TItEDtoPjPe8/UODLVMqELw6JkgAEsH9w vVtcD1yrx4ZNj2uMOTEl3JXUbAM0Gr2CJEDsVoU+TqzCNu6mQoHhnoZvm4EBL+18bSCH 3yJqyCw9CvgWP83RdxYhrj9SxtoMsEyxaiQtrey+eeAYljvV1kgBLldvNc7FR8e7ARee fRiCzRomlQ5qYtutK4G8hAKrfTkWiq8eQg3ugEoNohuoIYGR8wxoFYXtA4pcPM4yL7nE Hh+b/lEc4EyAi2VR0KnLBsLIAaRGsjzCVSIsxTCTNb/xNHmc9UInLN9zEfCBRFC8K9WD Pp9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:mime-version:user-agent:date:message-id :cc:to:subject:from:dkim-signature; bh=rWhdGl6k2vZJFKamBX2V73eoPTv3cre/LnPYdWw2PWQ=; b=WH1E+1V55itQUsU0hXm+CW9LsQyD5R0f+drMNqNpaoZpQdx9hOj8jv12UBGktDCTf8 01VcrIh5sm9m7yW/wiuyM//QDFC87UXrLlQq48wUTuuyp01Ji/Im4HgnetTf0NiPozFa j9kpsUZ/f+1AW3naBc4n8zx8lGneppvGnESRd7mrSCjHwhrR4J3ZeXo5uFdX/QI+vfku a+A+WRAk9qBE4Qeey+1pF4AYH7gnmy5mSwYcDg/XJRop5+QvpRG1aHezoa16+Qzpbtoy JkMME29QcbYNp5QZyAzgerQCjDgTnpp4zpvRARz8KRfSZXWU7u2wILNdHF0kS7+N/SWg sjlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="sL4/SJCd"; 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 p6-v6si1358881pfh.266.2018.10.03.06.04.09; Wed, 03 Oct 2018 06:04:25 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="sL4/SJCd"; 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 S1726997AbeJCTwB (ORCPT + 99 others); Wed, 3 Oct 2018 15:52:01 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:46329 "EHLO mail-pf1-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726679AbeJCTwB (ORCPT ); Wed, 3 Oct 2018 15:52:01 -0400 Received: by mail-pf1-f178.google.com with SMTP id r64-v6so1645410pfb.13; Wed, 03 Oct 2018 06:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=rWhdGl6k2vZJFKamBX2V73eoPTv3cre/LnPYdWw2PWQ=; b=sL4/SJCdkoZNAixm980EM2mFiFaRhviJHMILacOXk40dH8h4s+BU5sTYyifSPkWEso ZeRnRkr4XiP4cSaohE58cQFBjJg8QyQAGoBUH/iU9a02mkHx5COD65K5IgN58qBAIehi 1BG8n/rfvgJSGiWdkqZM/kcJ3GksnuPzjMonLmYzprDg1vl8VX+vPzPqmA2aS/OON21n RiFbNFX3W4Z7cuDwS0EMO0ZXivjWTjZ59ciOD+LFOGyWvlY5Y7U/+oniInZul5RFUz5S UFhDGdXxyAFMcEE7SbthIU8WzRgvhQx3PCmi1GRvq7PMNwNznKWD3uRqeaRbxz/5JvUh rGlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=rWhdGl6k2vZJFKamBX2V73eoPTv3cre/LnPYdWw2PWQ=; b=WiDt8GOGKHf2bPMdYf1hR+PIto4sOBn/4tkELngYHirHQ38sPoGWdyNlIM/+Z6p8+K 0z2VUzu+5isYXk2tC80cEirVaC+TloFQa3Y8vPqj6fQ7jKb1axHLg8d7syZ4eaXdbfSs 11ATZ6zprwRNi7kaNHsA0CKC8DpO172JpPbekOKan7571QlPqq6s03zciHv04vQ/2ZQB /30PNQ/sJcgLFs1VQ84u+iPyYHVdfXolV8Kdjj5JYoUYjrnJhZSg3vSO9sE6z/HKZjN4 aHJs92sIrUxNY5bxU/o4PFDmX8zEpIaRVHHZefiOynbm/IUsQgW0Olf33I+IOjZ0xjHU lOnw== X-Gm-Message-State: ABuFfojeWXBGnp+5Kpe3nl9vgBoJ3uj/ZO/KuFdvQ2HQrdVFZeDma30X IfbwV07ZAAOJwvDf2x7cruHUM7XI X-Received: by 2002:a63:34c7:: with SMTP id b190-v6mr1287044pga.184.1538571822379; Wed, 03 Oct 2018 06:03:42 -0700 (PDT) Received: from ?IPv6:2402:f000:1:1501:200:5efe:166.111.71.3? ([2402:f000:1:1501:200:5efe:a66f:4703]) by smtp.gmail.com with ESMTPSA id g5-v6sm2676253pfc.77.2018.10.03.06.03.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Oct 2018 06:03:41 -0700 (PDT) From: Jia-Ju Bai Subject: [REPORT] net: e100: possible data races To: jeffrey.t.kirsher@intel.com, davem@davemloft.net Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, Linux Kernel Mailing List Message-ID: <8b3eba57-bdf3-3c0d-1889-12a971f277d1@gmail.com> Date: Wed, 3 Oct 2018 21:03:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CPU0: e100_set_multicast_list e100_exec_cb line 854: spin_lock_irqsave() line 866: e100_configure (function pointer) line 1114: nic->flags [READ] line 1123: nic->flags [READ] CPU1: e100_watchdog line 1731: nic->flags [WRITE] line 1733: nic->flags [WRITE] As for nic->flags, the WRITE operations in CPU0 are performed with holding a spinlock, but the READ operations in CPU1 are performed without holding this spinlock, so there may exist data races. These possible races are detected by a runtime testing. I do not find a good way to fix these races, so I only report them. Best wishes, Jia-Ju Bai