linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>,
	JianHong Yin <jiyin@redhat.com>
Subject: Re: [nfs-utils PATCH] Don't allow junction tests to trigger automounts
Date: Wed, 04 Jan 2023 07:23:58 -0500	[thread overview]
Message-ID: <b81f1eb708b3d0fb60bde23ebd1dfd6fdb87aa3b.camel@kernel.org> (raw)
In-Reply-To: <20221213160104.198237-1-jlayton@kernel.org>

On Tue, 2022-12-13 at 11:01 -0500, Jeff Layton wrote:
> JianHong reported some strange behavior with automounts on an nfs server
> without an explicit pseudoroot. When clients issued a readdir in the
> pseudoroot, automounted directories that were not yet mounted would show
> up even if they weren't exported, though the clients wouldn't be able to
> do anything with them.
> 
> The issue was that triggering the automount on a directory would cause
> the mountd upcall to time out, which would cause nfsd to include the
> automounted dentry in the readdir response. Eventually, the automount
> would work and report that it wasn't exported and subsequent attempts to
> access the dentry would (properly) fail.
> 
> We never want mountd to trigger an automount. The kernel should do that
> if it wants to use it. Change the junction checks to do an O_PATH open
> and use fstatat with AT_NO_AUTOMOUNT.
> 
> Cc: Chuck Lever <chuck.lever@oracle.com>
> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2148353
> Reported-by: JianHong Yin <jiyin@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
>  support/junction/junction.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 

Ping? Steve, can you comment on (or merge) this patch?

Thanks,
-- 
Jeff Layton <jlayton@kernel.org>

  parent reply	other threads:[~2023-01-04 12:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 16:01 [nfs-utils PATCH] Don't allow junction tests to trigger automounts Jeff Layton
2022-12-13 16:25 ` Chuck Lever III
2022-12-13 16:41   ` Jeff Layton
2023-01-04 12:23 ` Jeff Layton [this message]
2023-01-11 15:55 ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b81f1eb708b3d0fb60bde23ebd1dfd6fdb87aa3b.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=jiyin@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).