diff options
| author | Eric Biggers <[email protected]> | 2019-03-20 18:39:11 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2019-04-17 14:05:51 +0000 |
| commit | 0bf3d5c1604ecbbd4e49e9f5b3c79152b87adb0d (patch) | |
| tree | 97a5f5cedec9b310490df829e03997036869c9fa /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
| parent | fscrypt: fix race allowing rename() and link() of ciphertext dentries (diff) | |
| download | kernel-0bf3d5c1604ecbbd4e49e9f5b3c79152b87adb0d.tar.gz kernel-0bf3d5c1604ecbbd4e49e9f5b3c79152b87adb0d.zip | |
fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory
Make __d_move() clear DCACHE_ENCRYPTED_NAME on the source dentry. This
is needed for when d_splice_alias() moves a directory's encrypted alias
to its decrypted alias as a result of the encryption key being added.
Otherwise, the decrypted alias will incorrectly be invalidated on the
next lookup, causing problems such as unmounting a mount the user just
mount()ed there.
Note that we don't have to support arbitrary moves of this flag because
fscrypt doesn't allow dentries with DCACHE_ENCRYPTED_NAME to be the
source or target of a rename().
Fixes: 28b4c263961c ("ext4 crypto: revalidate dentry after adding or removing the key")
Reported-by: Sarthak Kukreti <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
0 files changed, 0 insertions, 0 deletions
