xfs: assert a valid limit in xfs_rtfind_forw

commit 6d2db12d56 upstream.

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>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christoph Hellwig
2025-02-05 13:40:02 -08:00
committed by Greg Kroah-Hartman
parent 14cc006ed6
commit ed6282de3d
+2
View File
@@ -288,6 +288,8 @@ xfs_rtfind_forw(
xfs_rtword_t wdiff; /* difference from wanted value */
int word; /* word number in the buffer */
ASSERT(start <= limit);
/*
* Compute and read in starting bitmap block for starting block.
*/