diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-30 19:52:18 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-22 14:28:00 -0400 |
commit | 0e5c56fd07432c426b7ab1a84e8d97a00d7e08ca (patch) | |
tree | 8b0e0eba7e155ea5a311e1ec12b67a9e571f107d /fs/hfs | |
parent | 6b9cceead0d1fc478fbc25a7d8d8f006d061a1a2 (diff) | |
download | op-kernel-dev-0e5c56fd07432c426b7ab1a84e8d97a00d7e08ca.zip op-kernel-dev-0e5c56fd07432c426b7ab1a84e8d97a00d7e08ca.tar.gz |
hfs: don't allow mounting over .../rsrc
That's one case when unlink() destroys a subtree, thanks to "resource
fork" idiocy. We might forcibly evict that shit on unlink(2), but
for now let's just disallow overmounting; as it is, anything that
plays games with those would leak mounts.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfs')
-rw-r--r-- | fs/hfs/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 0612fa3..b3309b8 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -543,6 +543,7 @@ static struct dentry *hfs_file_lookup(struct inode *dir, struct dentry *dentry, igrab(dir); hlist_add_fake(&inode->i_hash); mark_inode_dirty(inode); + dont_mount(dentry); out: return d_splice_alias(inode, dentry); } |