* [PATCH] hid-elo: kill not flush the work
@ 2016-05-31 12:48 Oliver Neukum
2016-05-31 15:39 ` Benjamin Tissoires
2016-06-01 12:10 ` Jiri Kosina
0 siblings, 2 replies; 3+ messages in thread
From: Oliver Neukum @ 2016-05-31 12:48 UTC (permalink / raw)
To: jslaby, jikos, linux-input; +Cc: Oliver Neukum, Oliver Neukum, stable
Flushing a work that reschedules itself is not a sensible
operation. It needs to be killed. Failure to do so leads
to a kernel panic in the timer code.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
---
drivers/hid/hid-elo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-elo.c b/drivers/hid/hid-elo.c
index aad8c16..0cd4f72 100644
--- a/drivers/hid/hid-elo.c
+++ b/drivers/hid/hid-elo.c
@@ -261,7 +261,7 @@ static void elo_remove(struct hid_device *hdev)
struct elo_priv *priv = hid_get_drvdata(hdev);
hid_hw_stop(hdev);
- flush_workqueue(wq);
+ cancel_delayed_work_sync(&priv->work);
kfree(priv);
}
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hid-elo: kill not flush the work
2016-05-31 12:48 [PATCH] hid-elo: kill not flush the work Oliver Neukum
@ 2016-05-31 15:39 ` Benjamin Tissoires
2016-06-01 12:10 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Tissoires @ 2016-05-31 15:39 UTC (permalink / raw)
To: Oliver Neukum; +Cc: Jiri Slaby, Jiri Kosina, linux-input, stable
On Tue, May 31, 2016 at 2:48 PM, Oliver Neukum <oneukum@suse.com> wrote:
> Flushing a work that reschedules itself is not a sensible
> operation. It needs to be killed. Failure to do so leads
> to a kernel panic in the timer code.
>
> Signed-off-by: Oliver Neukum <ONeukum@suse.com>
> CC: stable@vger.kernel.org
Good catch.
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Thanks!
Benjamin
> ---
> drivers/hid/hid-elo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-elo.c b/drivers/hid/hid-elo.c
> index aad8c16..0cd4f72 100644
> --- a/drivers/hid/hid-elo.c
> +++ b/drivers/hid/hid-elo.c
> @@ -261,7 +261,7 @@ static void elo_remove(struct hid_device *hdev)
> struct elo_priv *priv = hid_get_drvdata(hdev);
>
> hid_hw_stop(hdev);
> - flush_workqueue(wq);
> + cancel_delayed_work_sync(&priv->work);
> kfree(priv);
> }
>
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hid-elo: kill not flush the work
2016-05-31 12:48 [PATCH] hid-elo: kill not flush the work Oliver Neukum
2016-05-31 15:39 ` Benjamin Tissoires
@ 2016-06-01 12:10 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2016-06-01 12:10 UTC (permalink / raw)
To: Oliver Neukum; +Cc: jslaby, linux-input, stable
On Tue, 31 May 2016, Oliver Neukum wrote:
> Flushing a work that reschedules itself is not a sensible
> operation. It needs to be killed. Failure to do so leads
> to a kernel panic in the timer code.
Applied to for-4.7/upstream-fixes. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-01 12:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 12:48 [PATCH] hid-elo: kill not flush the work Oliver Neukum
2016-05-31 15:39 ` Benjamin Tissoires
2016-06-01 12:10 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox