public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Yang Xiuwei <yangxiuwei@kylinos.cn>
Cc: io-uring@vger.kernel.org
Subject: Re: [PATCH] io_uring/tctx: prevent loop variable modification
Date: Mon, 9 Feb 2026 19:02:18 -0700	[thread overview]
Message-ID: <bb055dac-8530-41ff-892f-31c704f22a8f@kernel.dk> (raw)
In-Reply-To: <20260210013143.1791381-1-yangxiuwei@kylinos.cn>

On 2/9/26 6:31 PM, Yang Xiuwei wrote:
> 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?

Please do, the existing commit message is actively misleading. If
something is a cleanup or style improvement, it should not be implying
that it's fixing a bug, let alone one that claims it can "cause infinite
loops".

-- 
Jens Axboe

      reply	other threads:[~2026-02-10  2:02 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
2026-02-10  2:02     ` Jens Axboe [this message]

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=bb055dac-8530-41ff-892f-31c704f22a8f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=yangxiuwei@kylinos.cn \
    /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