From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: Re: [PATCH 3/4] devpts: Make the newinstance option historical Date: Sun, 23 Sep 2012 00:00:19 -0700 Message-ID: <87pq5d441o.fsf@xmission.com> References: <20120124220247.GA26353@hallyn.com> <20120124231601.GA4470@sergelap> <20120128195103.GA11299@sergelap> <87txup763i.fsf_-_@xmission.com> <87d31d75yj.fsf_-_@xmission.com> <20120923041906.GM13973@ZenIV.linux.org.uk> <87bogx5lg7.fsf@xmission.com> <20120923063038.GO13973@ZenIV.linux.org.uk> <20120923063445.GA26640@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120923063445.GA26640-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org> (Al Viro's message of "Sun, 23 Sep 2012 07:34:45 +0100") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Al Viro Cc: Greg Kroah-Hartman , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Kay Sievers , Dave Hansen , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andy Whitcroft , sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, Linus Torvalds , Alan Cox List-Id: containers.vger.kernel.org Al Viro writes: > On Sun, Sep 23, 2012 at 07:30:38AM +0100, Al Viro wrote: >> On Sat, Sep 22, 2012 at 10:59:04PM -0700, Eric W. Biederman wrote: >> >> > The test: >> > >> + if (filp->f_vfsmnt->mnt_root == filp->f_dentry) >> > kicks in and no redirection is performed. >> >> Umm... OK, after the first round of recursion. Unless you bind /something/pts >> on /something. > > Other way round, of course... E.g. > mount --bind /dev /dev/pts > mount --bind /dev /dev/pts/pts > etc. enough times to overflow the kernel stack on recursion. Except of course I gave the wrong explanation. I did the open with O_PATH. Since O_PATH never calls open recursion is impossible. Eric