From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1681577964; bh=1HH1sIzyttjvQASCsqW0jgwLWUwEbTPpuWqZnbijq/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qb2BIxW8QpC8r13B8e90DEP8nr0o+UZXO29J6oTUidco+3YRU9XxxtwVOsyn7mBVM mQl3HD/B0jh4lmIydIJyHsiNkDt3OKiPI3S+r+KrIV1211PraAZ+gORvTLXbUOnFoQ 6og34vaFtvVSgUPZNoYxphrQdFuxKK+EsgUTkAvViqkdj06BMbjIkC71BYIRlaBF8b Nqt4RDHo7OT9CB5rU7wQ5barDHeTu695P0I5NXM2W0zSI8+m5Q3s/bxDkqVLOx6VEd 3G2BxQyejemTIzzmlHzMYvLGwTPojnf3DxdPLH/rQ7slxsWh8WtsS7UZaxn+zb9e53 KFcnHtQwMm1WQ== Received: from localhost.localdomain (unknown [182.253.88.211]) by gnuweeb.org (Postfix) with ESMTPSA id D47ED245532; Sat, 15 Apr 2023 23:59:21 +0700 (WIB) From: Ammar Faizi To: Jens Axboe Cc: Ammar Faizi , Pavel Begunkov , Alviro Iskandar Setiawan , io-uring Mailing List , Linux Kernel Mailing List , GNU/Weeb Mailing List 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 Message-Id: <20230415165904.791841-4-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230415165904.791841-1-ammarfaizi2@gnuweeb.org> References: <20230415165904.791841-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 --- 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