| .. | .. |
|---|
| 50 | 50 | int ret; |
|---|
| 51 | 51 | u32 val; |
|---|
| 52 | 52 | |
|---|
| 53 | | - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) |
|---|
| 53 | + if (!access_ok(uaddr, sizeof(u32))) |
|---|
| 54 | 54 | return -EFAULT; |
|---|
| 55 | 55 | |
|---|
| 56 | 56 | smp_mb(); |
|---|
| .. | .. |
|---|
| 104 | 104 | int ret = 0; |
|---|
| 105 | 105 | u32 val; |
|---|
| 106 | 106 | |
|---|
| 107 | | - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) |
|---|
| 107 | + if (!access_ok(uaddr, sizeof(u32))) |
|---|
| 108 | 108 | return -EFAULT; |
|---|
| 109 | 109 | |
|---|
| 110 | 110 | preempt_disable(); |
|---|
| 111 | 111 | __ua_flags = uaccess_save_and_enable(); |
|---|
| 112 | 112 | __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" |
|---|
| 113 | + " .syntax unified\n" |
|---|
| 113 | 114 | "1: " TUSER(ldr) " %1, [%4]\n" |
|---|
| 114 | 115 | " teq %1, %2\n" |
|---|
| 115 | 116 | " it eq @ explicit IT needed for the 2b label\n" |
|---|
| 116 | | - "2: " TUSER(streq) " %3, [%4]\n" |
|---|
| 117 | + "2: " TUSERCOND(str, eq) " %3, [%4]\n" |
|---|
| 117 | 118 | __futex_atomic_ex_table("%5") |
|---|
| 118 | 119 | : "+r" (ret), "=&r" (val) |
|---|
| 119 | 120 | : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) |
|---|
| .. | .. |
|---|
| 133 | 134 | { |
|---|
| 134 | 135 | int oldval = 0, ret, tmp; |
|---|
| 135 | 136 | |
|---|
| 137 | + if (!access_ok(uaddr, sizeof(u32))) |
|---|
| 138 | + return -EFAULT; |
|---|
| 139 | + |
|---|
| 136 | 140 | #ifndef CONFIG_SMP |
|---|
| 137 | 141 | preempt_disable(); |
|---|
| 138 | 142 | #endif |
|---|
| 139 | | - pagefault_disable(); |
|---|
| 140 | 143 | |
|---|
| 141 | 144 | switch (op) { |
|---|
| 142 | 145 | case FUTEX_OP_SET: |
|---|
| .. | .. |
|---|
| 158 | 161 | ret = -ENOSYS; |
|---|
| 159 | 162 | } |
|---|
| 160 | 163 | |
|---|
| 161 | | - pagefault_enable(); |
|---|
| 162 | 164 | #ifndef CONFIG_SMP |
|---|
| 163 | 165 | preempt_enable(); |
|---|
| 164 | 166 | #endif |
|---|