Commit 8d406881 authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab

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: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 8a4e8f8d
...@@ -1932,12 +1932,12 @@ void rc_unregister_device(struct rc_dev *dev) ...@@ -1932,12 +1932,12 @@ void rc_unregister_device(struct rc_dev *dev)
if (!dev) if (!dev)
return; return;
del_timer_sync(&dev->timer_keyup);
del_timer_sync(&dev->timer_repeat);
if (dev->driver_type == RC_DRIVER_IR_RAW) if (dev->driver_type == RC_DRIVER_IR_RAW)
ir_raw_event_unregister(dev); ir_raw_event_unregister(dev);
del_timer_sync(&dev->timer_keyup);
del_timer_sync(&dev->timer_repeat);
rc_free_rx_device(dev); rc_free_rx_device(dev);
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment