ext4 crypto: revalidate dentry after adding or removing the key
authorTheodore Ts'o <tytso@mit.edu>
Mon, 8 Feb 2016 00:35:05 +0000 (19:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 May 2017 05:46:02 +0000 (07:46 +0200)
commit2faff9d1dfc560da3bfba6a8ab0c30246fd6c1cb
treefe2de7191aafd020e80d08243c5c3349fad1f42d
parente2968fb8e7980dccc199dac2593ad476db20969f
ext4 crypto: revalidate dentry after adding or removing the key

commit 28b4c263961c47da84ed8b5be0b5116bad1133eb upstream.

Add a validation check for dentries for encrypted directory to make
sure we're not caching stale data after a key has been added or removed.

Also check to make sure that status of the encryption key is updated
when readdir(2) is executed.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/crypto.c
fs/ext4/dir.c
fs/ext4/ext4.h
fs/ext4/namei.c