From 04dd17822334871b23ea2862f7798fb0e0007777 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Sat, 11 May 2024 08:53:19 +0000 Subject: [PATCH] change otg to host mode --- kernel/arch/microblaze/include/asm/futex.h | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/arch/microblaze/include/asm/futex.h b/kernel/arch/microblaze/include/asm/futex.h index 2572077..86131ed 100644 --- a/kernel/arch/microblaze/include/asm/futex.h +++ b/kernel/arch/microblaze/include/asm/futex.h @@ -34,7 +34,8 @@ { int oldval = 0, ret; - pagefault_disable(); + if (!access_ok(uaddr, sizeof(u32))) + return -EFAULT; switch (op) { case FUTEX_OP_SET: @@ -56,8 +57,6 @@ ret = -ENOSYS; } - pagefault_enable(); - if (!ret) *oval = oldval; @@ -71,7 +70,7 @@ int ret = 0, cmp; u32 prev; - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) + if (!access_ok(uaddr, sizeof(u32))) return -EFAULT; __asm__ __volatile__ ("1: lwx %1, %3, r0; \ -- Gitblit v1.6.2