Skip to content

Commit

Permalink
HID: fix lock imbalance in hidraw
Browse files Browse the repository at this point in the history
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 <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Slaby authored and Jiri Kosina committed Oct 22, 2008
1 parent b4d8e47 commit 0f2c594
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hid/hidraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
default:
ret = -ENOTTY;
}
unlock_kernel();
return ret;
}

Expand Down

0 comments on commit 0f2c594

Please sign in to comment.