diff options
author | Andy Lutomirski <luto@kernel.org> | 2016-02-06 12:16:20 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-02-09 09:33:12 +1100 |
commit | 86886cef4f4887f8be0b7e48e39a16571fa154ad (patch) | |
tree | 9b658ef9aa355f879d7836dd101a878cc2a76d72 | |
parent | 07f44ea06a4a8dafa49be1aaf9976f66b083b31d (diff) | |
download | linux-next-86886cef4f4887f8be0b7e48e39a16571fa154ad.tar.gz |
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>
-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 { static int uhid_event_from_user(const char __user *buffer, size_t len, struct uhid_event *event) { - if (is_compat_task()) { + if (in_compat_syscall()) { u32 type; if (get_user(type, buffer)) |