* [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked
@ 2015-12-11 20:24 ` Alexey Khoroshilov
0 siblings, 0 replies; 6+ messages in thread
From: Alexey Khoroshilov @ 2015-12-11 20:24 UTC (permalink / raw)
To: Ross Zwisler, Vishal Verma
Cc: Alexey Khoroshilov, Rafael J. Wysocki, Len Brown, linux-nvdimm,
linux-acpi, linux-kernel, ldv-project
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) {
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked
@ 2015-12-11 20:24 ` Alexey Khoroshilov
0 siblings, 0 replies; 6+ messages in thread
From: Alexey Khoroshilov @ 2015-12-11 20:24 UTC (permalink / raw)
To: Ross Zwisler, Vishal Verma
Cc: Alexey Khoroshilov, Rafael J. Wysocki, Len Brown, linux-nvdimm,
linux-acpi, linux-kernel, ldv-project
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) {
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked
2015-12-11 20:24 ` Alexey Khoroshilov
@ 2015-12-11 21:53 ` Ross Zwisler
-1 siblings, 0 replies; 6+ messages in thread
From: Ross Zwisler @ 2015-12-11 21:53 UTC (permalink / raw)
To: Alexey Khoroshilov
Cc: Ross Zwisler, Vishal Verma, Rafael J. Wysocki, Len Brown,
linux-nvdimm, linux-acpi, linux-kernel, ldv-project
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked
@ 2015-12-11 21:53 ` Ross Zwisler
0 siblings, 0 replies; 6+ messages in thread
From: Ross Zwisler @ 2015-12-11 21:53 UTC (permalink / raw)
To: Alexey Khoroshilov
Cc: Ross Zwisler, Vishal Verma, Rafael J. Wysocki, Len Brown,
linux-nvdimm, linux-acpi, linux-kernel, ldv-project
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked
2015-12-11 20:24 ` Alexey Khoroshilov
@ 2015-12-11 22:01 ` Verma, Vishal L
-1 siblings, 0 replies; 6+ messages in thread
From: Verma, Vishal L @ 2015-12-11 22:01 UTC (permalink / raw)
To: Alexey Khoroshilov, Ross Zwisler
Cc: Rafael J. Wysocki, Len Brown, linux-nvdimm, linux-acpi,
linux-kernel, ldv-project
On 12/11/15, 13:24, "Alexey Khoroshilov" <khoroshilov@ispras.ru> 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(-)
Looks good, thanks!
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
>
>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
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked
@ 2015-12-11 22:01 ` Verma, Vishal L
0 siblings, 0 replies; 6+ messages in thread
From: Verma, Vishal L @ 2015-12-11 22:01 UTC (permalink / raw)
To: Alexey Khoroshilov, Ross Zwisler
Cc: Rafael J. Wysocki, Len Brown, linux-nvdimm@lists.01.org,
linux-acpi, linux-kernel, ldv-project
On 12/11/15, 13:24, "Alexey Khoroshilov" <khoroshilov@ispras.ru> 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(-)
Looks good, thanks!
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
>
>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
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-11 22:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-12-11 21:53 ` Ross Zwisler
2015-12-11 22:01 ` Verma, Vishal L
2015-12-11 22:01 ` Verma, Vishal L
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.