diff options
| author | Long Li <leo.lilong@huawei.com> | 2026-03-10 20:32:33 +0800 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-03-11 13:21:42 +0100 |
| commit | 362c490980867930a098b99f421268fbd7ca05fd (patch) | |
| tree | 7d6c8019e64f3408d3439a9260ea9643697f8262 /include/linux | |
| parent | 52a8a1ba883defbfe3200baa22cf4cd21985d51a (diff) | |
xfs: fix integer overflow in bmap intent sort comparator
xfs_bmap_update_diff_items() sorts bmap intents by inode number using
a subtraction of two xfs_ino_t (uint64_t) values, with the result
truncated to int. This is incorrect when two inode numbers differ by
more than INT_MAX (2^31 - 1), which is entirely possible on large XFS
filesystems.
Fix this by replacing the subtraction with cmp_int().
Cc: <stable@vger.kernel.org> # v4.9
Fixes: 9f3afb57d5f1 ("xfs: implement deferred bmbt map/unmap operations")
Signed-off-by: Long Li <leo.lilong@huawei.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
