Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

CC: stable@vger.kernel.org
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Oliver Neukum and committed by
Jiri Kosina
ed596a4a dcc4c2f6

+1 -1
+1 -1
drivers/hid/hid-elo.c
··· 261 261 struct elo_priv *priv = hid_get_drvdata(hdev); 262 262 263 263 hid_hw_stop(hdev); 264 - flush_workqueue(wq); 264 + cancel_delayed_work_sync(&priv->work); 265 265 kfree(priv); 266 266 } 267 267