[PATCH 3/4] HID: hidraw, fix lock imbalance

From: Jiri Slaby
Date: Tue Oct 21 2008 - 17:28:19 EST


Add omitted unlock_kernel() to hidraw_ioctl().
Added in 979c407e3b89b606e810fa494ef316896eadbfad
(HID: Push down BKL into ioctl handler in hidraw).

Corresponing sparse warning:
drivers/hid/hidraw.c:267:9: warning: context imbalance in 'hidraw_ioctl': wrong count at exit
drivers/hid/hidraw.c:267:9: context 'kernel_lock': wanted 0, got 1

Signed-off-by: Jiri Slaby <jirislaby@xxxxxxxxx>
---
drivers/hid/hidraw.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index dffd464..f801755 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -264,6 +264,7 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
default:
ret = -ENOTTY;
}
+ unlock_kernel();
return ret;
}

--
1.6.0.2

--
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/