xfs: test for NULL xattr buffer problem during unlink

XFS had a bug that resulted in an unexpected NULL buffer during
unlink of an inode with a multi-level attr fork tree. This occurred
due to a stale reference to content in a released/reclaimed buffer.

Use the XFS buffer LRU reference count error injection tag to
recreate the conditions for the bug. Create a file with a
multi-level attr fork tree and then unlink it with buffer caching
disabled.

Commit f35c5e10c6ed ("xfs: reinit btree pointer on attr tree
inactivation walk") fixed the bug.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Brian Foster
2017-10-12 07:36:27 -04:00
committed by Eryu Guan
parent 2acbc4f07a
commit 954d9953c5
3 changed files with 93 additions and 0 deletions
+1
View File
@@ -430,3 +430,4 @@
430 dangerous_fuzzers dangerous_scrub dangerous_online_repair
431 auto quick dangerous
432 auto quick dir metadata
433 auto quick attr