From: Christoph Hellwig <hch@infradead.org>
To: Yuto Ohnuki <ytohnuki@amazon.com>
Cc: Carlos Maiolino <cem@kernel.org>,
Dave Chinner <dchinner@redhat.com>,
"Darrick J . Wong" <djwong@kernel.org>,
linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: fix integer overflow in busy extent sort comparator
Date: Tue, 31 Mar 2026 08:05:17 -0700 [thread overview]
Message-ID: <acvirV507y7CrQ8G@infradead.org> (raw)
In-Reply-To: <20260328173407.43057-6-ytohnuki@amazon.com>
On Sat, Mar 28, 2026 at 05:34:10PM +0000, Yuto Ohnuki wrote:
> xfs_extent_busy_ag_cmp() subtracts two uint32_t values (group
> numbers and block numbers) and returns the result as s32. When
> the difference exceeds INT_MAX, the result overflows and the sort
> order is corrupted.
>
> Use cmp_int() instead, as was done in commit 362c49098086 ("xfs:
> fix integer overflow in bmap intent sort comparator").
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2026-03-31 15:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 17:34 [PATCH 0/2] xfs: fix potential integer overflow in sort comparators Yuto Ohnuki
2026-03-28 17:34 ` [PATCH 1/2] xfs: fix integer overflow in deferred intent " Yuto Ohnuki
2026-03-31 15:05 ` Christoph Hellwig
2026-03-28 17:34 ` [PATCH 2/2] xfs: fix integer overflow in busy extent sort comparator Yuto Ohnuki
2026-03-31 15:05 ` Christoph Hellwig [this message]
2026-04-07 11:06 ` [PATCH 0/2] xfs: fix potential integer overflow in sort comparators Carlos Maiolino
2026-04-07 13:38 ` Carlos Maiolino
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=acvirV507y7CrQ8G@infradead.org \
--to=hch@infradead.org \
--cc=cem@kernel.org \
--cc=dchinner@redhat.com \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ytohnuki@amazon.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.