]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: always release btree buffers when refcountbt checks fail
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 9 Nov 2017 17:35:30 +0000 (11:35 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 9 Nov 2017 17:35:30 +0000 (11:35 -0600)
commit8743fab4a9b870fd6449c0724008ad3f94e954d7
tree20dc6e091be382d89bd3989085113b7fe86353be
parentb0e515d642feddc80a576b09140a09de764182df
xfs_repair: always release btree buffers when refcountbt checks fail

During phase 4 of repair, we compare the refcount records we've computed
against what's in the refcount btree.  If the btree is corrupt the
libxfs refcount calls will fail, but on our way out of the function we
don't make sure to clear all the btree cursor's buffer pointers.  This
leads to a repair deadlock in xfs/372 when fuzzing ptrs[1] to -1U
because we forgot to release a buffer.

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>
repair/rmap.c