lkml.org 
[lkml]   [2023]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH liburing 3/3] man/io_uring_cqe_get_data.3: Fix a misleading return value
Date
Since commit 8ecd3fd959634df8 ("Don't clear sqe->user_data as part of
command prep"), the prep functions no longer zero the user data. If the
user_data is not set, it will contain whatever previous value in it.

Therefore, the returned value when the user_data is-not-set is not
always NULL. And oh, someone once hit an issue because they assume the
return value is NULL if the user_data is not set. See the link below.

Fix the manpage, tell that the return value will be undefined.

Link: https://github.com/axboe/liburing/issues/575#issuecomment-1110516140
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
man/io_uring_cqe_get_data.3 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/io_uring_cqe_get_data.3 b/man/io_uring_cqe_get_data.3
index 4cbb32cd864e12c2..a4d2988a49d92aa8 100644
--- a/man/io_uring_cqe_get_data.3
+++ b/man/io_uring_cqe_get_data.3
@@ -46,7 +46,7 @@ or
If the
.I user_data
value has been set before submitting the request, it will be returned.
-Otherwise the functions returns NULL.
+Otherwise, the return value is undefined.
.SH SEE ALSO
.BR io_uring_get_sqe (3),
.BR io_uring_sqe_set_data (3),
--
Ammar Faizi
\
 
 \ /
  Last update: 2023-04-15 19:00    [W:0.048 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site