From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: procfs/d_invalidate break userland Date: Thu, 23 Apr 2015 00:51:35 +0100 Message-ID: <20150422235135.GY889@ZenIV.linux.org.uk> References: <5538318E.6000405@digikod.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Linux-Fsdevel , "Eric W. Biederman" , Miklos Szeredi , Greg Kroah-Hartman To: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:45346 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933102AbbDVXvi (ORCPT ); Wed, 22 Apr 2015 19:51:38 -0400 Content-Disposition: inline In-Reply-To: <5538318E.6000405@digikod.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Apr 23, 2015 at 01:41:02AM +0200, Micka=EBl Sala=FCn wrote: > Hi, >=20 > For your information, the commit bbd5192412fdedbae00888316bfe350bf89d= 0458 (proc: Update proc_flush_task_mnt to use d_invalidate), in the v3.= 17, break some userland use of procfs. >=20 > In a user namespace, I'm using /proc//task//fdinfo to mount= a tmpfs, chdir into it, terminate the thread, and use the tmpfs = as a private working directory for PID 1. This trick is useful to disco= nnect/d_drop a directory from the current file system and make it inacc= essible to the other processes (kind of an O_TMPFILE for directory). >=20 > With the v3.17 this is no more possible because it's no more possible= to mount anything in this tmpfs nor use the previously mounted file sy= stems in this tmpfs. >=20 > The new d_invalidate is really good to lazily invalidate/umount an en= tire hierarchy but I'm not sure the intention was to remove this useful= "feature" ;) And what will happen if you mount stuff there and exit? Dirty filesyst= em after reboot? -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html