From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Zwisler Subject: Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked Date: Fri, 11 Dec 2015 14:53:12 -0700 Message-ID: <20151211215312.GA13181@linux.intel.com> References: <1449865450-8145-1-git-send-email-khoroshilov@ispras.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga11.intel.com ([192.55.52.93]:52463 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751994AbbLKVxQ (ORCPT ); Fri, 11 Dec 2015 16:53:16 -0500 Content-Disposition: inline In-Reply-To: <1449865450-8145-1-git-send-email-khoroshilov@ispras.ru> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Alexey Khoroshilov Cc: Ross Zwisler , Vishal Verma , "Rafael J. Wysocki" , Len Brown , linux-nvdimm@lists.01.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org On Fri, Dec 11, 2015 at 11:24:10PM +0300, Alexey Khoroshilov wrote: > Even if dev->driver is null because we are being removed, > it is safer to not leave device locked. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov > --- > drivers/acpi/nfit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c > index e7ed39bab97d..aa45d4802707 100644 > --- a/drivers/acpi/nfit.c > +++ b/drivers/acpi/nfit.c > @@ -1810,7 +1810,7 @@ static void acpi_nfit_notify(struct acpi_device *adev, u32 event) > if (!dev->driver) { > /* dev->driver may be null if we're being removed */ > dev_dbg(dev, "%s: no driver found for dev\n", __func__); > - return; > + goto out_unlock; > } > > if (!acpi_desc) { This seems correct to me. Thanks for the patch. Reviewed-by: Ross Zwisler