Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1179101ybv; Thu, 20 Feb 2020 14:56:08 -0800 (PST) X-Google-Smtp-Source: APXvYqx4B7uS6rPA5m6k94NLINf7xw7tT9tFP0gyUGFEAUPx+Ata7kIghVPYpItIVhlnZ+LA12Qe X-Received: by 2002:a54:4003:: with SMTP id x3mr3710880oie.0.1582239368875; Thu, 20 Feb 2020 14:56:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582239368; cv=none; d=google.com; s=arc-20160816; b=kcotG2zpDUbcJLKm5rPh8c6JpRQpuYiCtYevYq/2Ly/fn8ng1rxgCYd6qmK7g52Thw rSINOEcC0T+nmimGsjDLMgGhlSw/SiRHEszJQYe6GXNBGGnub7DpZ9BYFajROxTocclS oPnsotE6uMcTeaO6YtdkyusdGKHyl6kPL+WfBrNbAnxIRsyqRHaVkVYyLH8Bls5TWDsa cDU1xyrvvndcrQlpFBl30oj37bq7h7gZGuU0HNppUBcmzaMlZWU7l/wZzmfYnlQGj0LZ Zac0r645/klyGkGNAPjUnggO4mme7/l/Rj/2LauQMmchsHByJMl5Wj4gkW4y4GeK29Ui +LAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=I7/yImgkY0Sa6ZnRrV6mJgPjc3S6UwmHRJ9bEKJaX3w=; b=DfY5I6EOVZofyDBRt3nX6jT9XjJK6LYTcNK3bXmKNkDdhkXoJlm1e0b7F2Yi84JbK6 ieAM+48vIIzXSOMohrOmtlT7KW3v3TT7LXZYa866ZaAhtUPzuTOuYdbc/xvroXz+DCdy G67hsmgDEYFtSsBXRtdtEnZmVPL+dcSdRbqU2aZaMsCyJRrSXQQDI7oCQJXdF/OVMzO2 Iv7xESC5kiY1uGhTHdPD7HaoyIhjZP5cWi+JiifGCwU3O7st65Brv5a3+7jpu/e2ZN5C RX1JgfqqxKf75wbsM7915IbPr8OhO+aiPH03JQTu+26hgXPUL+ta6Zpn8bReyGD7wKUe pCng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si433547ote.187.2020.02.20.14.55.55; Thu, 20 Feb 2020 14:56:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729301AbgBTWy3 (ORCPT + 99 others); Thu, 20 Feb 2020 17:54:29 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:41104 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729130AbgBTWy2 (ORCPT ); Thu, 20 Feb 2020 17:54:28 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4ui4-00G1j1-B7; Thu, 20 Feb 2020 22:54:20 +0000 Date: Thu, 20 Feb 2020 22:54:20 +0000 From: Al Viro To: "Eric W. Biederman" Cc: Linus Torvalds , LKML , Kernel Hardening , Linux API , Linux FS Devel , Linux Security Module , Akinobu Mita , Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Daniel Micay , Djalal Harouni , "Dmitry V . Levin" , Greg Kroah-Hartman , Ingo Molnar , "J . Bruce Fields" , Jeff Layton , Jonathan Corbet , Kees Cook , Oleg Nesterov , Solar Designer Subject: Re: [PATCH 4/7] proc: Use d_invalidate in proc_prune_siblings_dcache Message-ID: <20200220225420.GR23230@ZenIV.linux.org.uk> References: <20200212200335.GO23230@ZenIV.linux.org.uk> <20200212203833.GQ23230@ZenIV.linux.org.uk> <20200212204124.GR23230@ZenIV.linux.org.uk> <87lfp7h422.fsf@x220.int.ebiederm.org> <87pnejf6fz.fsf@x220.int.ebiederm.org> <871rqpaswu.fsf_-_@x220.int.ebiederm.org> <87blpt9e6m.fsf_-_@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87blpt9e6m.fsf_-_@x220.int.ebiederm.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 20, 2020 at 02:49:53PM -0600, Eric W. Biederman wrote: > > The function d_prune_aliases has the problem that it will only prune > aliases thare are completely unused. It will not remove aliases for > the dcache or even think of removing mounts from the dcache. For that > behavior d_invalidate is needed. > > To use d_invalidate replace d_prune_aliases with d_find_alias > followed by d_invalidate and dput. This is safe and complete > because no inode in proc has any hardlinks or aliases. s/no inode.*/it's a fucking directory inode./