Skip to content

Commit 8d40688

Browse files
seanyoungmchehab
authored andcommitted
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: [email protected] Signed-off-by: Sean Young <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 8a4e8f8 commit 8d40688

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/media/rc/rc-main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,12 +1932,12 @@ void rc_unregister_device(struct rc_dev *dev)
19321932
if (!dev)
19331933
return;
19341934

1935-
del_timer_sync(&dev->timer_keyup);
1936-
del_timer_sync(&dev->timer_repeat);
1937-
19381935
if (dev->driver_type == RC_DRIVER_IR_RAW)
19391936
ir_raw_event_unregister(dev);
19401937

1938+
del_timer_sync(&dev->timer_keyup);
1939+
del_timer_sync(&dev->timer_repeat);
1940+
19411941
rc_free_rx_device(dev);
19421942

19431943
mutex_lock(&dev->lock);

0 commit comments

Comments
 (0)