]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: don't return garbage buffers in xfs_da3_node_read
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 28 Jun 2018 20:11:57 +0000 (15:11 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Jun 2018 20:11:57 +0000 (15:11 -0500)
commit52581d38d832b4345aeaa1b68284fffab073b42a
tree653607760d040ba5fd0aa73857fb12cf884ecb76
parent55fdeb24c52e06e5fe29acf8f1a399603859a89b
xfs: don't return garbage buffers in xfs_da3_node_read

Source kernel commit: 924cade4df49e7c9fddcbae678dbd9dee3b0aeb6

If we're reading a node in a dir/attr btree and the buffer comes off the
disk with a magic number we don't recognize, don't ASSERT and don't set
a garbage buffer type (0 also triggers ASSERTs).  Instead, report the
corruption, release the buffer, and return -EFSCORRUPTED because that's
what the dabtree is -- corrupt.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_da_btree.c