summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorAl Viro2018-10-05 20:29:46 +0200
committerAl Viro2018-10-05 20:37:28 +0200
commitb07581d2d5add23ae163e3fbfb2fa5d36076922f (patch)
tree1e932e63894e23c27a6c332dedda164c02e78fbd /fs/ecryptfs
parentsysfs: Do not return POSIX ACL xattrs via listxattr (diff)
downloadkernel-qcow2-linux-b07581d2d5add23ae163e3fbfb2fa5d36076922f.tar.gz
kernel-qcow2-linux-b07581d2d5add23ae163e3fbfb2fa5d36076922f.tar.xz
kernel-qcow2-linux-b07581d2d5add23ae163e3fbfb2fa5d36076922f.zip
cachefiles: fix the race between cachefiles_bury_object() and rmdir(2)
the victim might've been rmdir'ed just before the lock_rename(); unlike the normal callers, we do not look the source up after the parents are locked - we know it beforehand and just recheck that it's still the child of what used to be its parent. Unfortunately, the check is too weak - we don't spot a dead directory since its ->d_parent is unchanged, dentry is positive, etc. So we sail all the way to ->rename(), with hosting filesystems _not_ expecting to be asked renaming an rmdir'ed subdirectory. The fix is easy, fortunately - the lock on parent is sufficient for making IS_DEADDIR() on child safe. Cc: stable@vger.kernel.org Fixes: 9ae326a69004 (CacheFiles: A cache that backs onto a mounted filesystem) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ecryptfs')
0 files changed, 0 insertions, 0 deletions