Merge tag 'locking-urgent-2020-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Merge commit. Changes below are compared with the first parent: 27d2dcb1.
Changes
1 files changed · +7 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| arch/arm/include/asm/futex.h | modified | +7 | −2 | View file |
arch/arm/include/asm/futex.h
View filediff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h
index e133da3..a915188 100644
--- a/arch/arm/include/asm/futex.h
+++ b/arch/arm/include/asm/futex.h
@@ -165,8 +165,13 @@ arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr)
preempt_enable();
#endif
- if (!ret)
- *oval = oldval;
+ /*
+ * Store unconditionally. If ret != 0 the extra store is the least
+ * of the worries but GCC cannot figure out that __futex_atomic_op()
+ * is either setting ret to -EFAULT or storing the old value in
+ * oldval which results in a uninitialized warning at the call site.
+ */
+ *oval = oldval;
return ret;
}