]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
HID: elo: kill not flush the work
authorOliver Neukum <oneukum@suse.com>
Tue, 31 May 2016 12:48:15 +0000 (14:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2016 16:55:50 +0000 (09:55 -0700)
commit ed596a4a88bd161f868ccba078557ee7ede8a6ef upstream.

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>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-elo.c

index 4e49462870abdf2f265c1528ae6c07fa4f783ec8..d0c8a1c1e1fe5c77e70469bdb45eeb1ae930bf9b 100644 (file)
@@ -259,7 +259,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);
 }