From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH] acpi: scan: Fix a possible data race in acpi_scan_hotplug_enabled Date: Wed, 9 May 2018 09:53:56 +0200 Message-ID: References: <20180508030811.12256-1-baijiaju1990@gmail.com> <1b7f1bff-b38b-fe10-3e1c-2b465b36f193@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <1b7f1bff-b38b-fe10-3e1c-2b465b36f193@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Jia-Ju Bai Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List List-Id: linux-acpi@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.