hid-elo: kill not flush the work
Subsystems (2)
PATCH 1/1 hid-elo: kill not flush the work
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.
--- drivers/hid/hid-elo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-elo.c +1 -1
@@ -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); }
Signature · 1 line
2.1.4
Quoted 6 lines · Oliver Neukum
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 <[email protected]>
Good catch.
Thanks!
Benjamin
Quoted 24 lines
--- drivers/hid/hid-elo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/hid-elo.c +1
-2@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Oliver Neukum
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,
Signature · 2 lines
Jiri Kosina SUSE Labs