hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/microblaze/include/asm/futex.h
....@@ -34,7 +34,8 @@
3434 {
3535 int oldval = 0, ret;
3636
37
- pagefault_disable();
37
+ if (!access_ok(uaddr, sizeof(u32)))
38
+ return -EFAULT;
3839
3940 switch (op) {
4041 case FUTEX_OP_SET:
....@@ -56,8 +57,6 @@
5657 ret = -ENOSYS;
5758 }
5859
59
- pagefault_enable();
60
-
6160 if (!ret)
6261 *oval = oldval;
6362
....@@ -71,7 +70,7 @@
7170 int ret = 0, cmp;
7271 u32 prev;
7372
74
- if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
73
+ if (!access_ok(uaddr, sizeof(u32)))
7574 return -EFAULT;
7675
7776 __asm__ __volatile__ ("1: lwx %1, %3, r0; \