Skip to content

Commit 0f2c594

Browse files
jirislabyJiri Kosina
authored andcommitted
HID: fix lock imbalance in hidraw
Add omitted unlock_kernel() to hidraw_ioctl(). Added in 979c407 (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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent b4d8e47 commit 0f2c594

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/hidraw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
264264
default:
265265
ret = -ENOTTY;
266266
}
267+
unlock_kernel();
267268
return ret;
268269
}
269270

0 commit comments

Comments
 (0)