summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-02-06 21:29:07 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-06 21:29:07 -0200
commita3318fa68e690e504facbbb034973611802f26c6 (patch)
treed1f23e73041a05e75e9ad51fe90172190225139b
parent36c59f9e8c39e5cb43d2da21c017075ea9cfa6a1 (diff)
downloadmediapointer-dvb-s2-a3318fa68e690e504facbbb034973611802f26c6.tar.gz
mediapointer-dvb-s2-a3318fa68e690e504facbbb034973611802f26c6.tar.bz2
Avoid race when deregistering the IR control for dvb-usb
From: Chris Rankin <rankincj@yahoo.com> 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>
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index 1bee5dfad..7b899cd6b 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -174,7 +174,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);
}