summaryrefslogtreecommitdiffstats
path: root/kernel/include/asm-generic/futex.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/asm-generic/futex.h')
-rw-r--r--kernel/include/asm-generic/futex.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/include/asm-generic/futex.h b/kernel/include/asm-generic/futex.h
index e56272c91..bf2d34c9d 100644
--- a/kernel/include/asm-generic/futex.h
+++ b/kernel/include/asm-generic/futex.h
@@ -108,11 +108,15 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
u32 val;
preempt_disable();
- if (unlikely(get_user(val, uaddr) != 0))
+ if (unlikely(get_user(val, uaddr) != 0)) {
+ preempt_enable();
return -EFAULT;
+ }
- if (val == oldval && unlikely(put_user(newval, uaddr) != 0))
+ if (val == oldval && unlikely(put_user(newval, uaddr) != 0)) {
+ preempt_enable();
return -EFAULT;
+ }
*uval = val;
preempt_enable();