public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-security-module@vger.kernel.org, miklos@szeredi.hu
Subject: Re: [RFC] readlink()-related oddities
Date: Fri, 20 Nov 2015 22:33:43 +0000	[thread overview]
Message-ID: <20151120223343.GO22011@ZenIV.linux.org.uk> (raw)
In-Reply-To: <22313.1448013545@warthog.procyon.org.uk>

On Fri, Nov 20, 2015 at 09:59:05AM +0000, David Howells wrote:

> There's an AFS userspace command that could be used to query a mountpoint that
> was going to use it.  However, I suspect readlink() will now always trigger
> the automount.

It won't, actually.  All we are passing to user_path_at_empty() is
LOOKUP_EMPTY, so for the final component we'll have
        if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
                           LOOKUP_OPEN | LOOKUP_CREATE | LOOKUP_AUTOMOUNT)) &&
            path->dentry->d_inode)
                return -EISDIR;
in follow_automount() trigger and follow_managed() will turn that -EISDIR
into 0.  IOW, readlink(2) does work on those, same as stat() (since Sep 2011).

Sigh...  OK, let's leave it for now; ->open() for those guys is completely
bogus, AFAICS, but that's local bogo^Wbusiness.

      parent reply	other threads:[~2015-11-20 22:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 23:26 [RFC] readlink()-related oddities Al Viro
2015-11-20  2:13 ` Linus Torvalds
2015-11-20  2:57   ` Al Viro
2015-11-20  3:09     ` Linus Torvalds
2015-11-20  3:16       ` Linus Torvalds
2015-11-20  3:24         ` Al Viro
2015-11-20 10:00     ` David Howells
2015-11-20  9:59 ` David Howells
2015-11-20 16:08   ` Al Viro
2015-11-20 16:26     ` David Howells
2015-11-20 22:33   ` Al Viro [this message]

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=20151120223343.GO22011@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.org \
    /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