Re: [PATCH 2/3] xfs_db: fix rdbmap_boundscheck

Eric Sandeen
2020-05-19T01:57:37Z

On 5/18/20 7:52 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> This predicate should check the a rt block number against number of
> rtblocks, not the number of AG blocks. Ooops.
>
> Fixes: 7161cd21b3ed ("xfs_db: bounds-check access to the dbmap array")
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

welp, sorry I missed this on regression testing;.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
> db/check.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> diff --git a/db/check.c b/db/check.c
> index c6fce605..12c03b6d 100644
> --- a/db/check.c
> +++ b/db/check.c
> @@ -1490,7 +1490,7 @@ static inline bool
> rdbmap_boundscheck(
> xfs_rfsblock_t bno)
> {
> - return bno < mp->m_sb.sb_agblocks;
> + return bno < mp->m_sb.sb_rblocks;
> }
>
> static void
>