From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
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
Date: Fri, 11 Dec 2015 14:53:12 -0700 [thread overview]
Message-ID: <20151211215312.GA13181@linux.intel.com> (raw)
In-Reply-To: <1449865450-8145-1-git-send-email-khoroshilov@ispras.ru>
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 <khoroshilov@ispras.ru>
> ---
> 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 <ross.zwisler@linux.intel.com>
WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
linux-nvdimm@ml01.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
Date: Fri, 11 Dec 2015 14:53:12 -0700 [thread overview]
Message-ID: <20151211215312.GA13181@linux.intel.com> (raw)
In-Reply-To: <1449865450-8145-1-git-send-email-khoroshilov@ispras.ru>
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 <khoroshilov@ispras.ru>
> ---
> 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 <ross.zwisler@linux.intel.com>
next prev parent reply other threads:[~2015-12-11 21:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 20:24 [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked Alexey Khoroshilov
2015-12-11 20:24 ` Alexey Khoroshilov
2015-12-11 21:53 ` Ross Zwisler [this message]
2015-12-11 21:53 ` Ross Zwisler
2015-12-11 22:01 ` Verma, Vishal L
2015-12-11 22:01 ` Verma, Vishal L
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151211215312.GA13181@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=khoroshilov@ispras.ru \
--cc=ldv-project@linuxtesting.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=rjw@rjwysocki.net \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.