hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/openrisc/include/asm/futex.h
....@@ -35,7 +35,8 @@
3535 {
3636 int oldval = 0, ret;
3737
38
- pagefault_disable();
38
+ if (!access_ok(uaddr, sizeof(u32)))
39
+ return -EFAULT;
3940
4041 switch (op) {
4142 case FUTEX_OP_SET:
....@@ -57,8 +58,6 @@
5758 ret = -ENOSYS;
5859 }
5960
60
- pagefault_enable();
61
-
6261 if (!ret)
6362 *oval = oldval;
6463
....@@ -72,7 +71,7 @@
7271 int ret = 0;
7372 u32 prev;
7473
75
- if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
74
+ if (!access_ok(uaddr, sizeof(u32)))
7675 return -EFAULT;
7776
7877 __asm__ __volatile__ ( \