Received: by 10.192.165.148 with SMTP id m20csp4726003imm; Tue, 8 May 2018 13:17:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp9zQu0OCpyVkQmwHkgoPzAHZUXXWOWAyfFDVlW769tME044jKctk9t4PNeFrMO7hoMWhyv X-Received: by 10.98.200.152 with SMTP id i24mr41653649pfk.35.1525810653662; Tue, 08 May 2018 13:17:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525810653; cv=none; d=google.com; s=arc-20160816; b=JVG6zEYIzQNti+0ZSY6pwE6epRhcrjj0fw7/u/rwA1Bt3Iex5uH0kjPfUk0V2OB+PQ b2uNKIKkr9YLwKf3CssJnoML9nnORbvevW2egINutRoCj/2lPUF0+u4HJdm/o8gNiXfP Xf3qp5MwctVO0ENxqNkszu4vujRTDxoJurO6gL6X81aT1pXRxqjl2ZKbOQA/HiULgkx2 qZxaGEO2UmKocNFOyKUPOD7G4mkB0KliPpr5lRdBsw19JT0qLvOANol3/qL1rTInGbOy bKvKtfjetbZMYnLVPfnYz9/BThx1xg+coF8dd2UdfHTXVZEDHJFC3A9BTov7+aRNAZ3M JTBQ== 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=OtoJXOeOQ0JgTOR1Q0+jkBPesr8TQ60pzHH17PgFqBU=; b=yM1IlsxukgVZOfIxKheF8G6jyILDb+fsYaS7RS4tYnUFysFzrONMZlOj5AHw3kSOeI kidLnxtSNK7en5Deu0euOiwAL2YqRA2P+7hDdgGJ93o/7yCFixOxquFWMwivt1zconoB fDoJk+YUaewcBpkgW4hoyeLUS1VdcE/CAI81OAfUuIUdtSNBpM3pKI/zTmM4Y/B2Rznd q8eLVoLBttvbz530QYWjxo3+9v/mp8P8e5oH3eSMmTvWnYJfIt6JnGSp0o/PCvEgfYsB x4nta219ckZMCzaM47l8VNpN7uPz7dSlVI9KG4uCA38UtBK12zRoDGBF6Yujhp0v4TbE qJ4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ahtM3Cmt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10-v6si19933536pgq.249.2018.05.08.13.17.18; Tue, 08 May 2018 13:17:33 -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=fail header.i=@gmail.com header.s=20161025 header.b=ahtM3Cmt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755604AbeEHURH (ORCPT + 99 others); Tue, 8 May 2018 16:17:07 -0400 Received: from mail-oi0-f48.google.com ([209.85.218.48]:41194 "EHLO mail-oi0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754622AbeEHURG (ORCPT ); Tue, 8 May 2018 16:17:06 -0400 Received: by mail-oi0-f48.google.com with SMTP id 11-v6so29504636ois.8; Tue, 08 May 2018 13:17:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OtoJXOeOQ0JgTOR1Q0+jkBPesr8TQ60pzHH17PgFqBU=; b=ahtM3CmtMz5kxrmzY55x5+wsf3+8EP9lAoWF/8psJaA1NHv3xrE4KUuVMLtAzC1pzS 37ghCkVrQby6IfbVajQdW82Kt7CRd8pkjm0NJh5+MqZE+4HQ/vc3tvBypLX9SUrImRPe xjIVmecYcuLF4wX86FMHN9mTsBbse/hMJwtKyJdLfP1Feo0DMLwt3/PMdv2slOvJUAWQ juFzPUMxFk0jxfBUKw3IY1fElfUaTKU1gYNKg7pa7JOdPGF5NpVtJLiqsBj1NCYD4NR7 jODhjwzAkMvL0sicaLp6tumb8t+QOG+grcmtzice6s2Ypz27KZoRg3XrC2oNe1uEOmOH PpMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=OtoJXOeOQ0JgTOR1Q0+jkBPesr8TQ60pzHH17PgFqBU=; b=CCQs5Zr0DPOTPVN7nnXpqmEg63nWAh5RSVv+Avu4IfQA6L4XC2sLvYlz281RWpRMUv J/X1jYoBm+SGdjCov3vUajF6Kecwzstxc74Uh9HzKM7flkQwe75X8CBFSGw8KVFD5bez sGeBak3xfZ/DFgivHJ/h62EkQDaGx8nkEi5BLEP12ox8a4APotLdUO65/9WhbNASV+HT jxUbDaB+I4HzBd1dAuacXmyFRCbMMCo3Jj+ksmm/SJTLKzl9SGpxbt6mxXmG3fJkY97X JKrO6dC/hlPgSbUFvTeFxV/XGqW7ce+W0lvM5TzpZjX5mRUEiyN3doZAn86wKqj8qmrA ygdQ== X-Gm-Message-State: ALQs6tCyTs/TTRy3B+zf5yeqixaWZt94fRDW1pfoYKcYDdPLOEjSJKir 7iF6EAHJY36wJnEdzoC4oCYCjtdCC7/zhyDqiqA= X-Received: by 2002:aca:ac06:: with SMTP id v6-v6mr28325167oie.227.1525810625362; Tue, 08 May 2018 13:17:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1468:0:0:0:0:0 with HTTP; Tue, 8 May 2018 13:17:04 -0700 (PDT) In-Reply-To: <20180508030811.12256-1-baijiaju1990@gmail.com> References: <20180508030811.12256-1-baijiaju1990@gmail.com> From: "Rafael J. Wysocki" Date: Tue, 8 May 2018 22:17:04 +0200 X-Google-Sender-Auth: eDMOOq3duh27M9QiJnNBGw8JNYA Message-ID: Subject: Re: [PATCH] acpi: scan: Fix a possible data race in acpi_scan_hotplug_enabled To: Jia-Ju Bai Cc: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List 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 Tue, May 8, 2018 at 5:08 AM, Jia-Ju Bai wrote: > The write operation to "hotplug->enabled" is protected by > the lock on line 1760, but the read operation to > this data on line 1755 is not protected by the lock. > Thus, there may exist a data race for "hotplug->enabled". Either it does exist, or it doesn't. If it exists, it needs to be fixed. If it doesn't exist, nothing needs to be done. Which is the case?