Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Lutomirski and committed by
Linus Torvalds
7365abba f4056b52

+1 -1
+1 -1
drivers/hid/uhid.c
··· 384 384 static int uhid_event_from_user(const char __user *buffer, size_t len, 385 385 struct uhid_event *event) 386 386 { 387 - if (is_compat_task()) { 387 + if (in_compat_syscall()) { 388 388 u32 type; 389 389 390 390 if (get_user(type, buffer))