kernel/arch/openrisc/include/asm/futex.h
.. .. @@ -35,7 +35,8 @@ 35 35 { 36 36 int oldval = 0, ret; 37 37 38 - pagefault_disable();38 + if (!access_ok(uaddr, sizeof(u32)))39 + return -EFAULT;39 40 40 41 switch (op) { 41 42 case FUTEX_OP_SET: .. .. @@ -57,8 +58,6 @@ 57 58 ret = -ENOSYS; 58 59 } 59 60 60 - pagefault_enable();61 -62 61 if (!ret) 63 62 *oval = oldval; 64 63 .. .. @@ -72,7 +71,7 @@ 72 71 int ret = 0; 73 72 u32 prev; 74 73 75 - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))74 + if (!access_ok(uaddr, sizeof(u32)))76 75 return -EFAULT; 77 76 78 77 __asm__ __volatile__ ( \