From: Andy Lutomirski Date: Tue, 22 Mar 2016 21:25:24 +0000 (-0700) Subject: drivers/hid/uhid.c: check write() bitness using in_compat_syscall X-Git-Tag: v4.9.8~2430^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7365abbade07f9181cbd013669642f129e9ec635;p=platform%2Fkernel%2Flinux-rpi3.git 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 Cc: David Herrmann Acked-by: Jiri Kosina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index e094c57..16b6f11 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))