public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Ammar Faizi <ammarfaizi2@gnuweeb.org>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>,
	io-uring Mailing List <io-uring@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>
Subject: [PATCH liburing 3/3] man/io_uring_cqe_get_data.3: Fix a misleading return value
Date: Sat, 15 Apr 2023 23:59:04 +0700	[thread overview]
Message-ID: <20230415165904.791841-4-ammarfaizi2@gnuweeb.org> (raw)
In-Reply-To: <20230415165904.791841-1-ammarfaizi2@gnuweeb.org>

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


  parent reply	other threads:[~2023-04-15 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 16:59 [PATCH liburing 0/3] io_uring-udp fix, manpage fix, and hppa cross-compiler Ammar Faizi
2023-04-15 16:59 ` [PATCH liburing 1/3] io_uring-udp: Fix the wrong IPv6 binary to string conversion Ammar Faizi
2023-04-15 16:59 ` [PATCH liburing 2/3] github: Add hppa cross compiler Ammar Faizi
2023-04-15 16:59 ` Ammar Faizi [this message]
2023-04-15 20:37 ` [PATCH liburing 0/3] io_uring-udp fix, manpage fix, and hppa cross-compiler Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230415165904.791841-4-ammarfaizi2@gnuweeb.org \
    --to=ammarfaizi2@gnuweeb.org \
    --cc=alviro.iskandar@gnuweeb.org \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=gwml@vger.gnuweeb.org \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox