Skip to content

Commit a406abe

Browse files
seanyounggregkh
authored andcommitted
media: rc: oops in ir_timer_keyup after device unplug
commit 8d40688 upstream. 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]> Signed-off-by: Sudip Mukherjee <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 67f7c68 commit a406abe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/media/rc/rc-main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,11 +1824,11 @@ void rc_unregister_device(struct rc_dev *dev)
18241824
if (!dev)
18251825
return;
18261826

1827-
del_timer_sync(&dev->timer_keyup);
1828-
18291827
if (dev->driver_type == RC_DRIVER_IR_RAW)
18301828
ir_raw_event_unregister(dev);
18311829

1830+
del_timer_sync(&dev->timer_keyup);
1831+
18321832
rc_free_rx_device(dev);
18331833

18341834
device_del(&dev->dev);

0 commit comments

Comments
 (0)