Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: fix possible deadlock in hidraw_read HID: fix kerneldoc comment for hid_input_report() HID: add __init/__exit macros to twinhan.c
This commit is contained in:
@@ -48,10 +48,9 @@ static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count,
|
||||
char *report;
|
||||
DECLARE_WAITQUEUE(wait, current);
|
||||
|
||||
mutex_lock(&list->read_mutex);
|
||||
|
||||
while (ret == 0) {
|
||||
|
||||
mutex_lock(&list->read_mutex);
|
||||
|
||||
if (list->head == list->tail) {
|
||||
add_wait_queue(&list->hidraw->wait, &wait);
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
Reference in New Issue
Block a user