Re: [PATCH 1/2] HID: usbkbd: synchronize LED URB submission

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 17 Nov 2011, Willem Penninckx wrote:

> usb_kbd_event() and usb_kbd_led() can be called concurrently, but they are not
> synchronized. They both readwrite kbd->leds, and usb_kbd_event() originally just
> checked the URB status field, while urb.h states that "It [status field] should
> not be examined before the URB is returned to the completion handler."
> 
> To fix this unsynchronized behavior, this patch introduces a boolean
> representing whether the URB is submitted, and a spinlock.

Interesting. Thanks for the fix.

Out of curiosity -- how did you find this out? I would have hoped noone is 
using these drivers.

> Signed-off-by: Willem Penninckx <willem.penninckx@xxxxxxxxxxxxxx>
> 
> --- linux-3.2-rc2/drivers/hid/usbhid/usbkbd.c	2011-11-15 18:02:59.000000000 +0100
> +++ linux-3.2-rc2/drivers/hid/usbhid/usbkbd-patch1.c	2011-11-17 10:21:18.099036158 +0100

Could you please resend the patch in a standardized kernel format so that 
I could apply it with patch -p1? (and the same holds for the second patch 
you have sent).

Thanks,

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux