The following commit has been merged in the linux branch: commit 03266d28ca5bf1959ee91dc6554c01b790975352 Merge: ae445b9134126314844ad9e84010bae5e6684103 b0e14951ee0f6c29abc64b92ec7075a159ede37c Author: Linus Torvalds torvalds@linux-foundation.org Date: Tue Oct 13 10:10:33 2009 -0700
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
diff --combined drivers/hid/hidraw.c index ba05275,b079a9c..cdd1369 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@@ -30,7 -30,6 +30,7 @@@ #include <linux/major.h> #include <linux/hid.h> #include <linux/mutex.h> +#include <linux/sched.h> #include <linux/smp_lock.h>
#include <linux/hidraw.h> @@@ -48,10 -47,9 +48,9 @@@ static ssize_t hidraw_read(struct file char *report; DECLARE_WAITQUEUE(wait, current);
- while (ret == 0) { - - mutex_lock(&list->read_mutex); + mutex_lock(&list->read_mutex);
+ while (ret == 0) { if (list->head == list->tail) { add_wait_queue(&list->hidraw->wait, &wait); set_current_state(TASK_INTERRUPTIBLE);