diff mbox

[v2,15/16] uhid: Check write() bitness using in_compat_syscall

Message ID 8c4d604b079099acb0df9ad849d53b589ea7aa9a.1453759363.git.luto@kernel.org (mailing list archive)
State Awaiting Upstream
Headers show

Commit Message

Andy Lutomirski Jan. 25, 2016, 10:24 p.m. UTC
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>
---
 drivers/hid/uhid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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))