From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754878AbcIPVPB (ORCPT ); Fri, 16 Sep 2016 17:15:01 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33323 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752001AbcIPVO7 (ORCPT ); Fri, 16 Sep 2016 17:14:59 -0400 Date: Fri, 16 Sep 2016 14:14:57 -0700 From: Omar Sandoval To: Ian Kent Cc: Andrew Morton , autofs mailing list , Kernel Mailing List , Al Viro , linux-fsdevel , "Eric W. Biederman" , kernel-team@fb.com Subject: Re: [PATCH 3/4] autofs - make mountpoint checks namespace aware Message-ID: <20160916211457.GA18830@vader.DHCP.thefacebook.com> References: <20160914061434.24714.490.stgit@pluto.themaw.net> <20160914061445.24714.68331.stgit@pluto.themaw.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160914061445.24714.68331.stgit@pluto.themaw.net> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 14, 2016 at 02:14:45PM +0800, Ian Kent wrote: > If an automount mount is clone(2)ed into a file system that is > propagation private, when it later expires in the originating > namespace subsequent calls to autofs ->d_automount() for that > dentry in the original namespace will return ELOOP until the > mount is manually umounted in the cloned namespace. > > In the same way, if an autofs mount is triggered by automount(8) > running within a container the dentry will be seen as mounted in > the root init namespace and calls to ->d_automount() in that namespace > will return ELOOP until the mount is umounted within the container. > > Also, have_submounts() can return an incorect result when a mount > exists in a namespace other than the one being checked. > > Signed-off-by: Ian Kent > Cc: Al Viro > Cc: Eric W. Biederman > Cc: Omar Sandoval I can confirm that this fixes my repro and hasn't caused any other problems as far as I can tell. Tested-by: Omar Sandoval -- Omar From mboxrd@z Thu Jan 1 00:00:00 1970 From: Omar Sandoval Subject: Re: [PATCH 3/4] autofs - make mountpoint checks namespace aware Date: Fri, 16 Sep 2016 14:14:57 -0700 Message-ID: <20160916211457.GA18830@vader.DHCP.thefacebook.com> References: <20160914061434.24714.490.stgit@pluto.themaw.net> <20160914061445.24714.68331.stgit@pluto.themaw.net> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LpY4ulnkqsChm5kVZckq14481GPY78p4FTt30QBUp2Y=; b=j8VeM1jNz+O8Ou8sP5yEalFrbv1biv/GvslSBRwbNfXqJDPgY7/6fZIzSsaR8zFo9W caJxiEgTj1sBSI2ReOs/dwPt/o5prjq1mwtplU1iqcb+JEDWLgYDRrdWBEFcBE86lw3H 1ywQ/0QQ1Jems5+n/JdzuKHQymAuQ/ilYAcgRXcVkSoi9d5cJ54dHjHn+zkZvFz6ElFY gR1NdTW4nJ7o47uNmnc587ZO0uXE9b5NUj3QcTCtJsufqxi6GqUGcVK3lAE9B9BbbSPl NarY5MPDK4aMSZdcXB89Pr/7hUaKiT5zhRVtQbEK+FL7nYNdZVFGqaTZG1/iYbbVKTMI iXpQ== Content-Disposition: inline In-Reply-To: <20160914061445.24714.68331.stgit@pluto.themaw.net> Sender: autofs-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Ian Kent Cc: Andrew Morton , autofs mailing list , Kernel Mailing List , Al Viro , linux-fsdevel , "Eric W. Biederman" , kernel-team@fb.com On Wed, Sep 14, 2016 at 02:14:45PM +0800, Ian Kent wrote: > If an automount mount is clone(2)ed into a file system that is > propagation private, when it later expires in the originating > namespace subsequent calls to autofs ->d_automount() for that > dentry in the original namespace will return ELOOP until the > mount is manually umounted in the cloned namespace. > > In the same way, if an autofs mount is triggered by automount(8) > running within a container the dentry will be seen as mounted in > the root init namespace and calls to ->d_automount() in that namespace > will return ELOOP until the mount is umounted within the container. > > Also, have_submounts() can return an incorect result when a mount > exists in a namespace other than the one being checked. > > Signed-off-by: Ian Kent > Cc: Al Viro > Cc: Eric W. Biederman > Cc: Omar Sandoval I can confirm that this fixes my repro and hasn't caused any other problems as far as I can tell. Tested-by: Omar Sandoval -- Omar -- To unsubscribe from this list: send the line "unsubscribe autofs" in