generic: test fscrypt key eviction racing with inode dirtying

Add a regression test for a bug in the FS_IOC_REMOVE_ENCRYPTION_KEY
ioctl fixed by commit 2b4eae95c736 ("fscrypt: don't evict dirty inodes
after removing key").

This ioctl is also tested by generic/580 and generic/581, but they
didn't cover the case where this bug occurs.

This test detects the bug on ext4, f2fs, and ubifs.  The multi-threaded
part of the test actually still fails on ubifs even with the fix, due to
another kernel bug which I'm working on fixing.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Eric Biggers
2020-03-23 09:40:34 -07:00
committed by Eryu Guan
parent b6093d0eed
commit 0afa39e891
3 changed files with 126 additions and 0 deletions
+1
View File
@@ -596,3 +596,4 @@
592 auto quick encrypt
593 auto quick encrypt
594 auto quick quota
595 auto quick encrypt