Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754051AbbLKWBw (ORCPT ); Fri, 11 Dec 2015 17:01:52 -0500 Received: from mga09.intel.com ([134.134.136.24]:8389 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753451AbbLKWBu convert rfc822-to-8bit (ORCPT ); Fri, 11 Dec 2015 17:01:50 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,415,1444719600"; d="scan'208";a="839503151" From: "Verma, Vishal L" To: Alexey Khoroshilov , Ross Zwisler CC: "Rafael J. Wysocki" , Len Brown , "linux-nvdimm@lists.01.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ldv-project@linuxtesting.org" Subject: Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked Thread-Topic: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked Thread-Index: AQHRNFHtVVKxvOdjyEedDA25vM1bjZ7GZy6A Date: Fri, 11 Dec 2015 22:01:48 +0000 Message-ID: References: <1449865450-8145-1-git-send-email-khoroshilov@ispras.ru> In-Reply-To: <1449865450-8145-1-git-send-email-khoroshilov@ispras.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.9.151119 x-originating-ip: [10.255.33.58] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1167 Lines: 42 On 12/11/15, 13:24, "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(-) Looks good, thanks! Reviewed-by: Vishal Verma > >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) { >-- >1.9.1 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/