HID: fix possible deadlock in hidraw_read
authorJiri Kosina <jkosina@suse.cz>
Mon, 12 Oct 2009 09:25:56 +0000 (11:25 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 12 Oct 2009 09:25:56 +0000 (11:25 +0200)
commitb0e14951ee0f6c29abc64b92ec7075a159ede37c
treeaa10393c1f54a2342fbd4d3624d6e68de376cd8d
parentff9b00a226ccea66e6ce70e9083c42f5b6001f73
HID: fix possible deadlock in hidraw_read

If the loop in hidraw_read() loops more than once, then we might
end up trying to acquire already locked mutex, casuing a deadlock.

Reported-by: iceberg <iceberg@ispras.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hidraw.c