All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-nfs@vger.kernel.org, adobriyan@gmail.com,
	viro@ZenIV.linux.org.uk
Subject: Re: [PATCH] proc: revalidate dentry returned by proc_pid_follow_link
Date: Fri, 6 Nov 2009 20:36:01 +0000	[thread overview]
Message-ID: <20091106203601.GD27751@shareable.org> (raw)
In-Reply-To: <1257513594-31071-1-git-send-email-jlayton@redhat.com>

Jeff Layton wrote:
> The problem here is that this makes that code shortcut any lookup or
> revalidation of the dentry. In general, this isn't a problem -- in most
> cases the dentry is known to be good. It is a problem however for NFSv4.
> If this symlink is followed on an open operation no actual open call
> occurs and the open state isn't properly established. This causes
> problems when we later try to use this file descriptor for actual
> operations.

As NFS uses open() as a kind of fcntl-lock barrier, I can see it's
important to do _something_ on new opens, rather than just cloning
most of the file descriptor.

> This patch takes a minimalist approach to fixing this by making the
> /proc/pid follow_link routine revalidate the dentry before returning it.

What happens if the file descriptor you are re-opening is for a file
which has been deleted.  Does it still have a revalidatable dentry?

-- Jamie

  reply	other threads:[~2009-11-06 20:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06 13:19 [PATCH] proc: revalidate dentry returned by proc_pid_follow_link Jeff Layton
2009-11-06 13:19 ` Jeff Layton
2009-11-06 20:36 ` Jamie Lokier [this message]
2009-11-06 21:06   ` Jeff Layton
2009-11-06 21:06     ` Jeff Layton
2009-11-08 10:15     ` Eric W. Biederman
     [not found]       ` <m17hu1miea.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2009-11-09  1:12         ` Jeff Layton
2009-11-09  1:12           ` Jeff Layton
2009-11-09  1:12           ` Jeff Layton
     [not found]           ` <20091108201237.79af5cac-PC62bkCOHzGdMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2009-11-09  3:30             ` Eric W. Biederman
2009-11-09  3:30               ` Eric W. Biederman
2009-11-09  3:30               ` Eric W. Biederman
     [not found]               ` <m1hbt49xxs.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2009-11-09 13:11                 ` Jeff Layton
2009-11-09 13:11                   ` Jeff Layton
2009-11-09 13:11                   ` Jeff Layton

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=20091106203601.GD27751@shareable.org \
    --to=jamie@shareable.org \
    --cc=adobriyan@gmail.com \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.