Re: [PATCH 2/2] xfs: fix integer overflow in busy extent sort comparator
From: Christoph Hellwig
Date: Tue Mar 31 2026 - 11:07:02 EST
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@xxxxxx>