Skip to content

Commit 73c6c02

Browse files
Sebastian Andrzej SiewiorPeter Zijlstra
authored andcommitted
futex: Correct the kernedoc return value for futex_wait_setup().
The kerneldoc for futex_wait_setup() states it can return "0" or "<1". This isn't true because the error case is "<0" not less than 1. Document that <0 is returned on error. Drop the possible return values and state possible reasons. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: André Almeida <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 4140e2b commit 73c6c02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/futex/waitwake.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,8 @@ int futex_wait_multiple(struct futex_vector *vs, unsigned int count,
585585
*
586586
* Return:
587587
* - 0 - uaddr contains val and hb has been locked;
588-
* - <1 - -EFAULT or -EWOULDBLOCK (uaddr does not contain val) and hb is unlocked
588+
* - <0 - On error and the hb is unlocked. A possible reason: the uaddr can not
589+
* be read, does not contain the expected value or is not properly aligned.
589590
*/
590591
int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags,
591592
struct futex_q *q, union futex_key *key2,

0 commit comments

Comments
 (0)