diff options
author | Andy Lutomirski <luto@kernel.org> | 2016-03-22 17:25:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-22 18:36:02 -0400 |
commit | 7365abbade07f9181cbd013669642f129e9ec635 (patch) | |
tree | bb0649b06ba54f11ab41f2c03f63465bed771e8d /drivers/hid/uhid.c | |
parent | f4056b52845283d1c1eaf546d7d05d74923029b2 (diff) |
drivers/hid/uhid.c: check write() bitness using in_compat_syscall
uhid changes the format expected in write() depending on bitness. It
should check the syscall bitness directly.
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hid/uhid.c')
-rw-r--r-- | drivers/hid/uhid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index e094c572b86e..16b6f11a0700 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c | |||
@@ -384,7 +384,7 @@ struct uhid_create_req_compat { | |||
384 | static int uhid_event_from_user(const char __user *buffer, size_t len, | 384 | static int uhid_event_from_user(const char __user *buffer, size_t len, |
385 | struct uhid_event *event) | 385 | struct uhid_event *event) |
386 | { | 386 | { |
387 | if (is_compat_task()) { | 387 | if (in_compat_syscall()) { |
388 | u32 type; | 388 | u32 type; |
389 | 389 | ||
390 | if (get_user(type, buffer)) | 390 | if (get_user(type, buffer)) |