[patch 25/71] HID: hiddev, fix lock imbalance
From: Greg KH
Date: Tue Jul 28 2009 - 19:59:23 EST
2.6.30-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Slaby <jirislaby@xxxxxxxxx>
commit 4859484b0957ddc7fe3e0fa349d98b0f1c7876bd upstream.
Add omitted BKL to one switch/case.
Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx>
Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/hid/usbhid/hiddev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -527,8 +527,10 @@ static noinline int hiddev_ioctl_usage(s
goto goodreturn;
case HIDIOCGCOLLECTIONINDEX:
+ i = field->usage[uref->usage_index].collection_index;
+ unlock_kernel();
kfree(uref_multi);
- return field->usage[uref->usage_index].collection_index;
+ return i;
case HIDIOCGUSAGES:
for (i = 0; i < uref_multi->num_values; i++)
uref_multi->values[i] =
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/