hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/sh/include/asm/futex.h
....@@ -2,8 +2,6 @@
22 #ifndef __ASM_SH_FUTEX_H
33 #define __ASM_SH_FUTEX_H
44
5
-#ifdef __KERNEL__
6
-
75 #include <linux/futex.h>
86 #include <linux/uaccess.h>
97 #include <asm/errno.h>
....@@ -22,7 +20,7 @@
2220 futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
2321 u32 oldval, u32 newval)
2422 {
25
- if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
23
+ if (!access_ok(uaddr, sizeof(u32)))
2624 return -EFAULT;
2725
2826 return atomic_futex_op_cmpxchg_inatomic(uval, uaddr, oldval, newval);
....@@ -33,8 +31,6 @@
3331 {
3432 u32 oldval, newval, prev;
3533 int ret;
36
-
37
- pagefault_disable();
3834
3935 do {
4036 ret = get_user(oldval, uaddr);
....@@ -67,13 +63,10 @@
6763 ret = futex_atomic_cmpxchg_inatomic(&prev, uaddr, oldval, newval);
6864 } while (!ret && prev != oldval);
6965
70
- pagefault_enable();
71
-
7266 if (!ret)
7367 *oval = oldval;
7468
7569 return ret;
7670 }
7771
78
-#endif /* __KERNEL__ */
7972 #endif /* __ASM_SH_FUTEX_H */