From: Yuto Ohnuki <ytohnuki@amazon.com>
To: Carlos Maiolino <cem@kernel.org>
Cc: Dave Chinner <dchinner@redhat.com>,
"Darrick J . Wong" <djwong@kernel.org>,
<linux-xfs@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Yuto Ohnuki <ytohnuki@amazon.com>
Subject: [PATCH 0/2] xfs: fix potential integer overflow in sort comparators
Date: Sat, 28 Mar 2026 17:34:08 +0000 [thread overview]
Message-ID: <20260328173407.43057-4-ytohnuki@amazon.com> (raw)
Several sort comparators in XFS subtract two uint32_t values and
return the result as int, which can overflow when the difference
exceeds INT_MAX.
Use cmp_int() instead, as was done in commit 362c49098086
("xfs: fix integer overflow in bmap intent sort comparator").
Patch 1 fixes the deferred intent comparators (rmap, extfree, refcount).
Patch 2 fixes the busy extent comparator.
Yuto Ohnuki (2):
xfs: fix integer overflow in deferred intent sort comparators
xfs: fix integer overflow in busy extent sort comparator
fs/xfs/xfs_extent_busy.c | 4 ++--
fs/xfs/xfs_extfree_item.c | 2 +-
fs/xfs/xfs_refcount_item.c | 2 +-
fs/xfs/xfs_rmap_item.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
--
2.50.1
Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284
Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705
next reply other threads:[~2026-03-28 17:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 17:34 Yuto Ohnuki [this message]
2026-03-28 17:34 ` [PATCH 1/2] xfs: fix integer overflow in deferred intent sort comparators 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
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=20260328173407.43057-4-ytohnuki@amazon.com \
--to=ytohnuki@amazon.com \
--cc=cem@kernel.org \
--cc=dchinner@redhat.com \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@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