Received: by 10.192.165.148 with SMTP id m20csp5208893imm; Wed, 9 May 2018 00:56:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpUU+L6aqGXrgMweKWU8HnRK6wC0xIDL2QoAP015oow94dLYTsu+H9Vd/UrLNaHpC+CLRb8 X-Received: by 10.98.137.219 with SMTP id n88mr42693963pfk.11.1525852573936; Wed, 09 May 2018 00:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525852573; cv=none; d=google.com; s=arc-20160816; b=lSLubepNd7tYmbXUU6yIJhDa5tWXdPc1Inw9iJEcPSdfxkNiGU3zvkg4VEZKHAjaKb u7apoh2kbXcdciCXf0Yb74Q/gCwskYwodW2ZVmFLe/EeVt42xH1PPSctujuc9uRb5XVu 4NkML3B/8KqZsjuNNjhUc+BkHqmrdhUMCRmbwtHxi8QTtMG4Bb/ShkZ1NCEayIxCL16Z 0hEQob/2osHyJU/+HjRa5Fu8M0QXAaKvpHsrFT+Rf7IgsFwP5d0CocUrEl8QSylLcpA1 9fwdYh/hRoAocXRzTJmYOA5epTIYQrBJ69zJEI06CoySEHZxorznlhCaHOFya+GINpf6 ENQA== 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=tmhPaIbYV6kNT8pqZ2uVLLeeqVjJ7B9gWrx6mlUGfik=; b=tDjUqmzA5bb795EGGI0zlA+pCVwiOg8X38vPyFzwz7oF6aY1gitN9R4ooYWFM5n1UW Wwt0tsWXO41KmSr1MoL0VziVFdxb68vkIBCw6yicm2r1MoRt50zyJZiUAQtH0hhsly9F WTd59ozuwYQ3iXl1qaykKKDkKeuGSw6yvHIcjgOP+ph2BXbdLzDUFsnkd+Rk4xHIkgTB +1BjFP6T0eEigZ43WgegbqjHhCB1Vse4ykKq7SCYkpyQE41JxSXmShQmVeoylY32lV85 /jpufdYJDfj2AvkN+L2+PCduYqWz91R8+ESGjubxpoRAUc8R8e1RLaqM5OoxlBPrbwy9 5GwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=S/Sv7L+9; 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 r9-v6si26162955plo.442.2018.05.09.00.55.59; Wed, 09 May 2018 00:56:13 -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=S/Sv7L+9; 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 S933919AbeEIHyB (ORCPT + 99 others); Wed, 9 May 2018 03:54:01 -0400 Received: from mail-ot0-f173.google.com ([74.125.82.173]:40982 "EHLO mail-ot0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933806AbeEIHx5 (ORCPT ); Wed, 9 May 2018 03:53:57 -0400 Received: by mail-ot0-f173.google.com with SMTP id t1-v6so39142867oth.8; Wed, 09 May 2018 00:53:57 -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=tmhPaIbYV6kNT8pqZ2uVLLeeqVjJ7B9gWrx6mlUGfik=; b=S/Sv7L+99it4ErfZSPEJKJVnSJfnkfSARuCUVjGOUPiu1ldRkzUTcxnCR5AWv4vkui aoiuGKzzyKX2USg6KdZ8hrHWlK41a/GI2G4OrTzFZpmn8JJC355DP209wmbvtrQLv0Ev RVG/wee49lBGYaw5FvmlUFYVruuLMBXWS12W8I3pV1fwUSIzmW7yMYNiwdIV4vTgTwrT Ly6FkImKpihsnZ2MEcNC5LKDc/zeJKVD60KOldozeG/qnMd67i4U61ilm1SwXomvOU33 w5sjEie2VXOMIVW+Lp3xevQDZ7cfgBTMchrglBdpDevEE+dvpRvejxvxEYGXns3ERiOa KxQA== 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=tmhPaIbYV6kNT8pqZ2uVLLeeqVjJ7B9gWrx6mlUGfik=; b=JyjE9zLIWbL7EgP2ygHanJEg5JwcgeO1NQPdJ6gXGqGACQ4EgI4UCrZD8+db2yUEDj QIjspp0IzyEGMqjiaqXwCmB7d+JyOqPAkPMMvjb04qTLe9lVtGSFZQu8pjKBe6MbBzKu Mv4hYdpWF/n+4Gx76lPnMFFNGpHQBjPqlECcy7bL0Rs95tHI1v2bwtOvajrwd3FRlL6g ymd43jbBd7pdjTFBPOin/sj0oPbeGlDKrHH7CFywWo1VTTPQ4xaUVp0dmVd0IT4ZpJV7 SpzjFFVIwPdCQwrUxVzBn8p/K25mzDhRPRR82z+7cARBz76sEXLYMI066xQxTPJC5XoL gbPA== X-Gm-Message-State: ALKqPwdIG2707uuMX5v1l1qfvbyMhobtha2920e/lMepwJTfaSGDkVF/ uyZE9UwQASfeYHCmjJb1pMwf5m7eNTOn9TyRASg= X-Received: by 2002:a9d:5990:: with SMTP id u16-v6mr4838001oth.370.1525852436687; Wed, 09 May 2018 00:53:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:1468:0:0:0:0:0 with HTTP; Wed, 9 May 2018 00:53:56 -0700 (PDT) In-Reply-To: <1b7f1bff-b38b-fe10-3e1c-2b465b36f193@gmail.com> References: <20180508030811.12256-1-baijiaju1990@gmail.com> <1b7f1bff-b38b-fe10-3e1c-2b465b36f193@gmail.com> From: "Rafael J. Wysocki" Date: Wed, 9 May 2018 09:53:56 +0200 X-Google-Sender-Auth: x7GfQckR2ytlKk4ewohIFmP_PA0 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" , "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 Wed, May 9, 2018 at 5:17 AM, Jia-Ju Bai wrote: > > > On 2018/5/9 4:17, Rafael J. Wysocki wrote: >> >> 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? > > > I only read the code and find this possible data race. > It is not found in real driver execution. > I am not sure of it, so I use "may" and "possible" here. It looks like you are not actually sure what you are doing then.