mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
xfs: dabtree scrub needs to range-check level
Make sure scrub's dabtree iterator function checks that we're not going deeper in the stack than our cursor permits. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
parent
6958d11f77
commit
228de124f2
1 changed files with 5 additions and 0 deletions
|
@ -574,6 +574,11 @@ xchk_da_btree(
|
|||
/* Drill another level deeper. */
|
||||
blkno = be32_to_cpu(key->before);
|
||||
level++;
|
||||
if (level >= XFS_DA_NODE_MAXDEPTH) {
|
||||
/* Too deep! */
|
||||
xchk_da_set_corrupt(&ds, level - 1);
|
||||
break;
|
||||
}
|
||||
ds.tree_level--;
|
||||
error = xchk_da_btree_block(&ds, level, blkno);
|
||||
if (error)
|
||||
|
|
Loading…
Reference in a new issue