generic: test fscrypt key eviction racing with inode dirtying
authorEric Biggers <ebiggers@google.com>
Mon, 23 Mar 2020 16:40:34 +0000 (09:40 -0700)
committerEryu Guan <guaneryu@gmail.com>
Mon, 6 Apr 2020 12:42:26 +0000 (20:42 +0800)
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>

No differences found