[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191119051003.893735938@linuxfoundation.org>
Date: Tue, 19 Nov 2019 06:19:40 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Oliver Neukum <oneukum@...e.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
syzbot+b6c55daa701fc389e286@...kaller.appspotmail.com
Subject: [PATCH 5.3 20/48] Input: ff-memless - kill timer in destroy()
From: Oliver Neukum <oneukum@...e.com>
commit fa3a5a1880c91bb92594ad42dfe9eedad7996b86 upstream.
No timer must be left running when the device goes away.
Signed-off-by: Oliver Neukum <oneukum@...e.com>
Reported-and-tested-by: syzbot+b6c55daa701fc389e286@...kaller.appspotmail.com
Cc: stable@...r.kernel.org
Link: https://lore.kernel.org/r/1573726121.17351.3.camel@suse.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/input/ff-memless.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/drivers/input/ff-memless.c
+++ b/drivers/input/ff-memless.c
@@ -489,6 +489,15 @@ static void ml_ff_destroy(struct ff_devi
{
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);
}
Powered by blists - more mailing lists