xfs: check dabtree node hash values when loading child blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 21 Sep 2020 16:15:09 +0000 (09:15 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 23 Sep 2020 15:58:51 +0000 (08:58 -0700)
commite581c9397a25458c06b05f37efce2c480836ef4f
treeb67096d8d02d7a81aaad2a1ad88975e2c69d2bf6
parent8df0fa39bdd86ca81a8d706a6ed9d33cc65ca625
xfs: check dabtree node hash values when loading child blocks

When xchk_da_btree_block is loading a non-root dabtree block, we know
that the parent block had to have a (hashval, address) pointer to the
block that we just loaded.  Check that the hashval in the parent matches
the block we just loaded.

This was found by fuzzing nbtree[3].hashval = ones in xfs/394.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/dabtree.c