diff options
author | Chris Rankin <rankincj@yahoo.com> | 2007-02-06 18:29:07 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:35:31 -0500 |
commit | e1af498063007cee5d7ec5af1e0cf25c088d05c7 (patch) | |
tree | 39067ca8764c1993aca6ed777f9eae4dae43335d /drivers | |
parent | 705d41e5da674b449f900df97ad13ebe53e82b82 (diff) |
V4L/DVB (5178): Avoid race when deregistering the IR control for dvb-usb
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index 19ff5978bc91..9511a31c8f50 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | |||
@@ -151,7 +151,7 @@ int dvb_usb_remote_init(struct dvb_usb_device *d) | |||
151 | int dvb_usb_remote_exit(struct dvb_usb_device *d) | 151 | int dvb_usb_remote_exit(struct dvb_usb_device *d) |
152 | { | 152 | { |
153 | if (d->state & DVB_USB_STATE_REMOTE) { | 153 | if (d->state & DVB_USB_STATE_REMOTE) { |
154 | cancel_delayed_work(&d->rc_query_work); | 154 | cancel_rearming_delayed_work(&d->rc_query_work); |
155 | flush_scheduled_work(); | 155 | flush_scheduled_work(); |
156 | input_unregister_device(d->rc_input_dev); | 156 | input_unregister_device(d->rc_input_dev); |
157 | } | 157 | } |