From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25B7FC7619A for ; Sat, 15 Apr 2023 16:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230117AbjDOQ7d (ORCPT ); Sat, 15 Apr 2023 12:59:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbjDOQ7b (ORCPT ); Sat, 15 Apr 2023 12:59:31 -0400 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF6B42D73; Sat, 15 Apr 2023 09:59:24 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.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 --- 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