hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/arch/hexagon/include/asm/futex.h
....@@ -21,7 +21,7 @@
2121 "3:\n" \
2222 ".section .fixup,\"ax\"\n" \
2323 "4: %1 = #%5;\n" \
24
- " jump 3b\n" \
24
+ " jump ##3b\n" \
2525 ".previous\n" \
2626 ".section __ex_table,\"a\"\n" \
2727 ".long 1b,4b,2b,4b\n" \
....@@ -36,7 +36,8 @@
3636 {
3737 int oldval = 0, ret;
3838
39
- pagefault_disable();
39
+ if (!access_ok(uaddr, sizeof(u32)))
40
+ return -EFAULT;
4041
4142 switch (op) {
4243 case FUTEX_OP_SET:
....@@ -62,8 +63,6 @@
6263 ret = -ENOSYS;
6364 }
6465
65
- pagefault_enable();
66
-
6766 if (!ret)
6867 *oval = oldval;
6968
....@@ -77,7 +76,7 @@
7776 int prev;
7877 int ret;
7978
80
- if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
79
+ if (!access_ok(uaddr, sizeof(u32)))
8180 return -EFAULT;
8281
8382 __asm__ __volatile__ (
....@@ -91,7 +90,7 @@
9190 "3:\n"
9291 ".section .fixup,\"ax\"\n"
9392 "4: %0 = #%6\n"
94
- " jump 3b\n"
93
+ " jump ##3b\n"
9594 ".previous\n"
9695 ".section __ex_table,\"a\"\n"
9796 ".long 1b,4b,2b,4b\n"