Commit 41dd902f authored by Will Deacon's avatar Will Deacon Committed by Greg Kroah-Hartman

futex: Update comments and docs about return values of arch futex code

commit 42750351 upstream.

The architecture implementations of 'arch_futex_atomic_op_inuser()' and
'futex_atomic_cmpxchg_inatomic()' are permitted to return only -EFAULT,
-EAGAIN or -ENOSYS in the case of failure.

Update the comments in the asm-generic/ implementation and also a stray
reference in the robust futex documentation.
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 272ca391
...@@ -218,5 +218,4 @@ All other architectures should build just fine too - but they won't have ...@@ -218,5 +218,4 @@ All other architectures should build just fine too - but they won't have
the new syscalls yet. the new syscalls yet.
Architectures need to implement the new futex_atomic_cmpxchg_inatomic() Architectures need to implement the new futex_atomic_cmpxchg_inatomic()
inline function before writing up the syscalls (that function returns inline function before writing up the syscalls.
-ENOSYS right now).
...@@ -23,7 +23,9 @@ ...@@ -23,7 +23,9 @@
* *
* Return: * Return:
* 0 - On success * 0 - On success
* <0 - On error * -EFAULT - User access resulted in a page fault
* -EAGAIN - Atomic operation was unable to complete due to contention
* -ENOSYS - Operation not supported
*/ */
static inline int static inline int
arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr) arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr)
...@@ -85,7 +87,9 @@ arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr) ...@@ -85,7 +87,9 @@ arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr)
* *
* Return: * Return:
* 0 - On success * 0 - On success
* <0 - On error * -EFAULT - User access resulted in a page fault
* -EAGAIN - Atomic operation was unable to complete due to contention
* -ENOSYS - Function not implemented (only if !HAVE_FUTEX_CMPXCHG)
*/ */
static inline int static inline int
futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment