projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47d06a1
)
Input: ff-memless - kill timer in destroy()
author
Oliver Neukum
<oneukum@suse.com>
Fri, 15 Nov 2019 19:35:05 +0000
(11:35 -0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:45:14 +0000
(18:45 +0100)
commit
fa3a5a1880c91bb92594ad42dfe9eedad7996b86
upstream.
No timer must be left running when the device goes away.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-and-tested-by: syzbot+b6c55daa701fc389e286@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Link:
https://lore.kernel.org/r/1573726121.17351.3.camel@suse.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/ff-memless.c
patch
|
blob
|
history
diff --git
a/drivers/input/ff-memless.c
b/drivers/input/ff-memless.c
index
2743ed4
..
1cd23bf
100644
(file)
--- a/
drivers/input/ff-memless.c
+++ b/
drivers/input/ff-memless.c
@@
-501,6
+501,15
@@
static void ml_ff_destroy(struct ff_device *ff)
{
struct ml_device *ml = ff->private;
+ /*
+ * Even though we stop all playing effects when tearing down
+ * an input device (via input_device_flush() that calls into
+ * input_ff_flush() that stops and erases all effects), we
+ * do not actually stop the timer, and therefore we should
+ * do it here.
+ */
+ del_timer_sync(&ml->timer);
+
kfree(ml->private);
}