diff options
author | Sean Young <sean@mess.org> | 2018-03-06 08:57:57 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-21 11:11:26 -0400 |
commit | 8d4068810d9926250dd2435719a080b889eb44c3 (patch) | |
tree | 7cfde2df50aa7ba80ef478bf0f1836b622046dc0 /drivers/media/rc/rc-main.c | |
parent | 8a4e8f8dfc69941eab6ede7a844fbed0c4841241 (diff) |
media: rc: oops in ir_timer_keyup after device unplug
If there is IR in the raw kfifo when ir_raw_event_unregister() is called,
then kthread_stop() causes ir_raw_event_thread to be scheduled, decode
some scancodes and re-arm timer_keyup. The timer_keyup then fires when
the rc device is long gone.
Cc: stable@vger.kernel.org
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/rc-main.c')
-rw-r--r-- | drivers/media/rc/rc-main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 4a952108ba1e..8621761a680f 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c | |||
@@ -1932,12 +1932,12 @@ void rc_unregister_device(struct rc_dev *dev) | |||
1932 | if (!dev) | 1932 | if (!dev) |
1933 | return; | 1933 | return; |
1934 | 1934 | ||
1935 | del_timer_sync(&dev->timer_keyup); | ||
1936 | del_timer_sync(&dev->timer_repeat); | ||
1937 | |||
1938 | if (dev->driver_type == RC_DRIVER_IR_RAW) | 1935 | if (dev->driver_type == RC_DRIVER_IR_RAW) |
1939 | ir_raw_event_unregister(dev); | 1936 | ir_raw_event_unregister(dev); |
1940 | 1937 | ||
1938 | del_timer_sync(&dev->timer_keyup); | ||
1939 | del_timer_sync(&dev->timer_repeat); | ||
1940 | |||
1941 | rc_free_rx_device(dev); | 1941 | rc_free_rx_device(dev); |
1942 | 1942 | ||
1943 | mutex_lock(&dev->lock); | 1943 | mutex_lock(&dev->lock); |