Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1289886 > unrolled thread
| Started by | Alexey Khoroshilov <khoroshilov@ispras.ru> |
|---|---|
| First post | 2015-12-11 21:30 +0100 |
| Last post | 2015-12-11 23:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] nfit: acpi_nfit_notify(): Do not leave device locked Alexey Khoroshilov <khoroshilov@ispras.ru> - 2015-12-11 21:30 +0100
Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-12-11 23:00 +0100
Re: [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked "Verma, Vishal L" <vishal.l.verma@intel.com> - 2015-12-11 23:10 +0100
| From | Alexey Khoroshilov <khoroshilov@ispras.ru> |
|---|---|
| Date | 2015-12-11 21:30 +0100 |
| Subject | [PATCH] nfit: acpi_nfit_notify(): Do not leave device locked |
| Message-ID | <qECue-Pv-15@gated-at.bofh.it> |
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
--
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/
[toc] | [next] | [standalone]
| From | Ross Zwisler <ross.zwisler@linux.intel.com> |
|---|---|
| Date | 2015-12-11 23:00 +0100 |
| Message-ID | <qEDTk-1BH-13@gated-at.bofh.it> |
| In reply to | #1289886 |
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>
--
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/
[toc] | [prev] | [next] | [standalone]
| From | "Verma, Vishal L" <vishal.l.verma@intel.com> |
|---|---|
| Date | 2015-12-11 23:10 +0100 |
| Message-ID | <qEE2Z-1U8-1@gated-at.bofh.it> |
| In reply to | #1289886 |
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
>
>
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web