All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Leandro Awa <lawa@nvidia.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] namei: results of d_is_negative() should be checked after dentry revalidation
Date: Fri, 9 Oct 2015 17:19:02 -0700	[thread overview]
Message-ID: <CA+55aFzMMEB_zLoS+SznZCiW8k3ZgMO4BBFFJz7=Cj99FXiXmQ@mail.gmail.com> (raw)
In-Reply-To: <1444412674-3077-1-git-send-email-trond.myklebust@primarydata.com>

On Fri, Oct 9, 2015 at 10:44 AM, Trond Myklebust
<trond.myklebust@primarydata.com> wrote:
>
> The issue is that revalidation may cause the dentry to be dropped in NFS
> if, say, the client notes that the directory timestamps have changed.

Ack.

We've had this bug before, where we returned something else than
-ENOCHLD while we were doing RCU lookups. See for example commit
97242f99a013 ("link_path_walk(): be careful when failing with
ENOTDIR").

So in general, we should always (a) either verify all sequence points
or (b) return -ENOCHLD to go into slow mode. The patch seems

However, this thing was explicitly made to be this way by commit
766c4cbfacd8 ("namei: d_is_negative() should be checked before ->d_seq
validation"), so while my gut feel is to consider this fix
ObviouslyCorrect(tm), I will delay it a bit in the hope to get an ACK
and comment from Al about the patch.

Al?

                  Linus

  reply	other threads:[~2015-10-10  0:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 18:57 RCU caching regression in kernel v4.1+ Trond Myklebust
2015-10-07 18:57 ` Trond Myklebust
2015-10-08 12:54 ` Trond Myklebust
2015-10-08 12:54   ` Trond Myklebust
     [not found]   ` <1444308880.43040.1.camel-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>
2015-10-08 17:28     ` Leandro Awa
2015-10-08 17:28       ` Leandro Awa
2015-10-09  0:01   ` Leandro Awa
2015-10-09  0:01     ` Leandro Awa
2015-10-09 17:44     ` [PATCH] namei: results of d_is_negative() should be checked after dentry revalidation Trond Myklebust
2015-10-09 17:44       ` Trond Myklebust
2015-10-09 17:44       ` Trond Myklebust
2015-10-10  0:19       ` Linus Torvalds [this message]
2015-10-10  1:36         ` Al Viro
2015-10-10  1:36           ` Al Viro
2015-10-10 17:13           ` Al Viro
2015-10-10 17:13             ` Al Viro
2015-10-10 17:19             ` Linus Torvalds

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='CA+55aFzMMEB_zLoS+SznZCiW8k3ZgMO4BBFFJz7=Cj99FXiXmQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=lawa@nvidia.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    --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.