summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2013-09-05 14:39:11 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-09-05 16:23:50 -0400
commiteed810076685c77dc9a8c5c3593e641c93caed1c (patch)
tree5aba507073b0a7e29dfa0739272dfeda16eb5e29 /fs/cifs
parent848ac114e847af3f1f9141c90a39ebe79bdb13b3 (diff)
downloadop-kernel-dev-eed810076685c77dc9a8c5c3593e641c93caed1c.zip
op-kernel-dev-eed810076685c77dc9a8c5c3593e641c93caed1c.tar.gz
vfs: check unlinked ancestors before mount
We check submounts before doing d_drop() on a non-empty directory dentry in NFS (have_submounts()), but we do not exclude a racing mount. Nor do we prevent mounts to be added to the disconnected subtree using relative paths after the d_drop(). This patch fixes these issues by checking for unlinked (unhashed, non-root) ancestors before proceeding with the mount. This is done with rename seqlock taken for write and with ->d_lock grabbed on each ancestor in turn, including our dentry itself. This ensures that the only one of check_submounts_and_drop() or has_unlinked_ancestor() can succeed. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cifs')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud