diff options
author | Christoph Hellwig <hch@lst.de> | 2024-08-30 15:36:54 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-09-01 08:58:19 -0700 |
commit | 6d2db12d56a389b3e8efa236976f8dc3a8ae00f0 (patch) | |
tree | db5628131d90072aedaa5f4c8a11615e8a0c63f6 /fs/xfs/libxfs | |
parent | 119c65e56bc131b466a7cd958a4089e286ce3c4b (diff) |
xfs: assert a valid limit in xfs_rtfind_forw
Protect against developers passing stupid limits when refactoring the
RT code once again.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_rtbitmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c index 9feeefe53948..4de97c4e8ebd 100644 --- a/fs/xfs/libxfs/xfs_rtbitmap.c +++ b/fs/xfs/libxfs/xfs_rtbitmap.c @@ -315,6 +315,8 @@ xfs_rtfind_forw( xfs_rtword_t incore; unsigned int word; /* word number in the buffer */ + ASSERT(start <= limit); + /* * Compute and read in starting bitmap block for starting block. */ |