From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:42824 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030846AbeEYXy2 (ORCPT ); Fri, 25 May 2018 19:54:28 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fMMXT-0002YA-E3 for linux-fsdevel@vger.kernel.org; Fri, 25 May 2018 23:54:27 +0000 From: Al Viro To: linux-fsdevel@vger.kernel.org Subject: [PATCH 05/10] hfs: don't allow mounting over .../rsrc Date: Sat, 26 May 2018 00:54:21 +0100 Message-Id: <20180525235426.9750-5-viro@ZenIV.linux.org.uk> In-Reply-To: <20180525235426.9750-1-viro@ZenIV.linux.org.uk> References: <20180525235326.GJ30522@ZenIV.linux.org.uk> <20180525235426.9750-1-viro@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Al Viro 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 --- fs/hfs/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 0612fa367bd1..b3309b83371a 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); } -- 2.11.0