Skip to content

Commit

Permalink
V4L/DVB (5178): Avoid race when deregistering the IR control for dvb-usb
Browse files Browse the repository at this point in the history
The work item function is dvb_usb_read_remote_control():
        INIT_WORK(&d->rc_query_work, dvb_usb_read_remote_control, d);
and the last piece of work it does is:
        schedule_delayed_work(&d->rc_query_work,msecs_to_jiffies(d->props.rc_interval));
Hence you need to call "cancel_rearming_delayed_work()" and not
"cancel_delayed_work()", correct?  I certainly haven't seen this oops
reoccur since I applied this patch.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Chris Rankin authored and Mauro Carvalho Chehab committed Feb 21, 2007
1 parent 705d41e commit e1af498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-usb/dvb-usb-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
int dvb_usb_remote_exit(struct dvb_usb_device *d)
{
if (d->state & DVB_USB_STATE_REMOTE) {
cancel_delayed_work(&d->rc_query_work);
cancel_rearming_delayed_work(&d->rc_query_work);
flush_scheduled_work();
input_unregister_device(d->rc_input_dev);
}
Expand Down

0 comments on commit e1af498

Please sign in to comment.