mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hang Zhengyang <hang.zhengyang1010@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Pavel Begunkov <asml.silence@gmail.com>,
	Keith Busch <kbusch@kernel.org>,
	Nicholas Carlini <nicholas@carlini.com>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: [PATCH 2/2] io_uring/fdinfo: don't skip the SQE after a 128-byte one
Date: Sat,  5 Dec 2026 10:48:54 +0000	[thread overview]
Message-ID: <20261205104854.1207958-3-hang.zhengyang1010@gmail.com> (raw)
In-Reply-To: <20261205104854.1207958-1-hang.zhengyang1010@gmail.com>

For a 128-byte SQE on an IORING_SETUP_SQE_MIXED ring, the SQ dump in
fdinfo increments both i and sq_head, so it moves on three slots instead
of two. It then skips the next SQE, and the dump goes past the SQ tail.

The i++ was added to stop the dump at the tail, but the sq_head++ that
skipped the second half was kept. Drop it.

Fixes: 101e596e7404 ("io_uring/fdinfo: cap SQ iteration at max SQ entries")
Fixes: b59efde9e6c1 ("io_uring/fdinfo: fix SQE_MIXED SQE displaying")
Cc: stable@vger.kernel.org # v7.0+
Signed-off-by: Hang Zhengyang <hang.zhengyang1010@gmail.com>
---
 io_uring/fdinfo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index 46e64b041360..bd7f80474144 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -125,7 +125,6 @@ static void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, struct seq_file *m)
 					sq_idx);
 				break;
 			}
-			sq_head++;
 			i++;
 			sqe128 = true;
 		}
-- 
2.53.0


  parent reply	other threads:[~2026-12-05 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 10:48 [PATCH 0/2] io_uring: fix compat sendmsg retry and SQE_MIXED fdinfo Hang Zhengyang
2026-12-05 10:48 ` [PATCH 1/2] io_uring/net: restore msg_controllen on compat sendmsg retry Hang Zhengyang
2026-12-05 10:48 ` Hang Zhengyang [this message]
2026-12-05 14:04 ` [PATCH 0/2] io_uring: fix compat sendmsg retry and SQE_MIXED fdinfo 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=20261205104854.1207958-3-hang.zhengyang1010@gmail.com \
    --to=hang.zhengyang1010@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicholas@carlini.com \
    --cc=stable@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

all inboxes | Powered by JetHome®