From a36159eec6ca17402b0e146b86efaf76568dc353 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 20 Sep 2024 01:41:23 +0000 Subject: [PATCH] 重命名 AX88772C_eeprom/asix.c 为 asix_mac.c --- kernel/arch/openrisc/include/asm/futex.h | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/arch/openrisc/include/asm/futex.h b/kernel/arch/openrisc/include/asm/futex.h index 618da4a..865e9cd 100644 --- a/kernel/arch/openrisc/include/asm/futex.h +++ b/kernel/arch/openrisc/include/asm/futex.h @@ -35,7 +35,8 @@ { int oldval = 0, ret; - pagefault_disable(); + if (!access_ok(uaddr, sizeof(u32))) + return -EFAULT; switch (op) { case FUTEX_OP_SET: @@ -57,8 +58,6 @@ ret = -ENOSYS; } - pagefault_enable(); - if (!ret) *oval = oldval; @@ -72,7 +71,7 @@ int ret = 0; u32 prev; - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) + if (!access_ok(uaddr, sizeof(u32))) return -EFAULT; __asm__ __volatile__ ( \ -- Gitblit v1.6.2