From: Yang Xiuwei <yangxiuwei@kylinos.cn>
To: axboe@kernel.dk
Cc: io-uring@vger.kernel.org
Subject: Re: [PATCH] io_uring/tctx: prevent loop variable modification
Date: Tue, 10 Feb 2026 09:31:43 +0800 [thread overview]
Message-ID: <20260210013143.1791381-1-yangxiuwei@kylinos.cn> (raw)
In-Reply-To: <63b52c5d-5c8c-4085-9d90-12374da974e3@kernel.dk>
On 2/9/26 5:42 AM, Jens Axboe wrote:
> I think this is fine as a cleanup as it makes it more clear, but I fail
> to see how you can ever have this cause an issue.
You're right - this isn't a bug fix. The current callers already validate
bounds, so there's no actual issue.
My intention was code cleanup: avoiding loop variable modification in the
loop body improves clarity by separating the logical index from the
sanitized array index.
Sorry for the misleading commit message. Should I send a v2 framing it
as a cleanup?
next prev parent reply other threads:[~2026-02-10 1:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 6:19 [PATCH] io_uring/tctx: prevent loop variable modification Yang Xiuwei
2026-02-09 11:42 ` Jens Axboe
2026-02-10 1:31 ` Yang Xiuwei [this message]
2026-02-10 2:02 ` 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=20260210013143.1791381-1-yangxiuwei@kylinos.cn \
--to=yangxiuwei@kylinos.cn \
--cc=axboe@kernel.dk \
--cc=io-uring@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