]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - repair/phase6.c
xfs_repair: don't assert on bad '.' entry in no-modify mode
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 23 May 2018 21:30:48 +0000 (16:30 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 23 May 2018 21:30:48 +0000 (16:30 -0500)
commit369c0b5f82be66f81b03dea1115f6b1dc1bca529
treeeb339d8fdedd887efc3e04a6b2910b48c78376da
parent8fec4f7ce2b346edb5051a3a330d7df1cf5feb05
xfs_repair: don't assert on bad '.' entry in no-modify mode

During phase 3, we check the '.' entry of a directory inode and (in
modify mode) zap it if the name isn't valid.  During phase 6, we assert
that the '.' entry now reflects the correct name.  In no-modify mode
this is incorrect because we didn't actually fix anything, so repair
asserts and crashes.

Found by fuzzing bu[0].namelen = 4 in xfs/387 and running xfs_repair -n.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase6.c