lkml.org 
[lkml]   [2011]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/3] HID: usbhid: defer LED setting to a workqueue
Date
Am Dienstag, 1. November 2011, 10:25:47 schrieb Daniel Kurtz:
> Defer LED setting action to a workqueue.
> This is more likely to perform all LED change events in a single URB.
>
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> drivers/hid/hid-input.c | 42 ++++++++++++++++++++++++++++++++++++++++
> drivers/hid/usbhid/hid-core.c | 43 +++++++++++++++++++++++++++++++---------
> drivers/hid/usbhid/usbhid.h | 2 +
> include/linux/hid.h | 2 +

> @@ -1292,6 +1314,7 @@ static void hid_cancel_delayed_stuff(struct usbhid_device *usbhid)
> {
> del_timer_sync(&usbhid->io_retry);
> cancel_work_sync(&usbhid->reset_work);
> + cancel_work_sync(&usbhid->led_work);
> }

Hi,

this seems to introduce a race in usbhid_stop() which might fail to kill the urb
used to change the LEDs.

Regards
Oliver


\
 
 \ /
  Last update: 2011-11-07 15:49    [W:0.042 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site