[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174782916686.406.18111680517101107267.tip-bot2@tip-bot2>
Date: Wed, 21 May 2025 12:06:06 -0000
From: "tip-bot2 for Sebastian Andrzej Siewior" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, andrealmeid@...lia.com,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: locking/futex] futex: Correct the kernedoc return value for
futex_wait_setup().
The following commit has been merged into the locking/futex branch of tip:
Commit-ID: 73c6c02b4febbb2c2761e559f31af8c7b87e81a5
Gitweb: https://git.kernel.org/tip/73c6c02b4febbb2c2761e559f31af8c7b87e81a5
Author: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate: Sat, 17 May 2025 17:14:55 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Wed, 21 May 2025 13:57:41 +02:00
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 <bigeasy@...utronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: André Almeida <andrealmeid@...lia.com>
Link: https://lore.kernel.org/r/20250517151455.1065363-6-bigeasy@linutronix.de
---
kernel/futex/waitwake.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/futex/waitwake.c b/kernel/futex/waitwake.c
index b3738fb..e2bbe55 100644
--- a/kernel/futex/waitwake.c
+++ b/kernel/futex/waitwake.c
@@ -585,7 +585,8 @@ int futex_wait_multiple(struct futex_vector *vs, unsigned int count,
*
* Return:
* - 0 - uaddr contains val and hb has been locked;
- * - <1 - -EFAULT or -EWOULDBLOCK (uaddr does not contain val) and hb is unlocked
+ * - <0 - On error and the hb is unlocked. A possible reason: the uaddr can not
+ * be read, does not contain the expected value or is not properly aligned.
*/
int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags,
struct futex_q *q, union futex_key *key2,
Powered by blists - more mailing lists