| .. | .. |
|---|
| 16 | 16 | _futex_spin_lock_irqsave(u32 __user *uaddr, unsigned long int *flags) |
|---|
| 17 | 17 | { |
|---|
| 18 | 18 | extern u32 lws_lock_start[]; |
|---|
| 19 | | - long index = ((long)uaddr & 0xf0) >> 2; |
|---|
| 19 | + long index = ((long)uaddr & 0x7f8) >> 1; |
|---|
| 20 | 20 | arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index]; |
|---|
| 21 | 21 | local_irq_save(*flags); |
|---|
| 22 | 22 | arch_spin_lock(s); |
|---|
| .. | .. |
|---|
| 26 | 26 | _futex_spin_unlock_irqrestore(u32 __user *uaddr, unsigned long int *flags) |
|---|
| 27 | 27 | { |
|---|
| 28 | 28 | extern u32 lws_lock_start[]; |
|---|
| 29 | | - long index = ((long)uaddr & 0xf0) >> 2; |
|---|
| 29 | + long index = ((long)uaddr & 0x7f8) >> 1; |
|---|
| 30 | 30 | arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index]; |
|---|
| 31 | 31 | arch_spin_unlock(s); |
|---|
| 32 | 32 | local_irq_restore(*flags); |
|---|
| .. | .. |
|---|
| 40 | 40 | u32 tmp; |
|---|
| 41 | 41 | |
|---|
| 42 | 42 | _futex_spin_lock_irqsave(uaddr, &flags); |
|---|
| 43 | | - pagefault_disable(); |
|---|
| 44 | 43 | |
|---|
| 45 | 44 | ret = -EFAULT; |
|---|
| 46 | 45 | if (unlikely(get_user(oldval, uaddr) != 0)) |
|---|
| .. | .. |
|---|
| 73 | 72 | ret = -EFAULT; |
|---|
| 74 | 73 | |
|---|
| 75 | 74 | out_pagefault_enable: |
|---|
| 76 | | - pagefault_enable(); |
|---|
| 77 | 75 | _futex_spin_unlock_irqrestore(uaddr, &flags); |
|---|
| 78 | 76 | |
|---|
| 79 | 77 | if (!ret) |
|---|
| .. | .. |
|---|
| 95 | 93 | if (uaccess_kernel() && !uaddr) |
|---|
| 96 | 94 | return -EFAULT; |
|---|
| 97 | 95 | |
|---|
| 98 | | - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) |
|---|
| 96 | + if (!access_ok(uaddr, sizeof(u32))) |
|---|
| 99 | 97 | return -EFAULT; |
|---|
| 100 | 98 | |
|---|
| 101 | 99 | /* HPPA has no cmpxchg in hardware and therefore the |
|---|