Skip to content
Commit c196adf8 authored by Willem Penninckx's avatar Willem Penninckx Committed by Jiri Kosina
Browse files

HID: usbkbd: synchronize LED URB submission



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.

Signed-off-by: default avatarWillem Penninckx <willem.penninckx@cs.kuleuven.be>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent f2c4826c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment