All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Miklos Szeredi <mszeredi@redhat.com>,
	linux-fsdevel@vger.kernel.org, NeilBrown <neil@brown.name>
Subject: Re: [PATCH] fuse: prevent exchange/revalidate races
Date: Wed, 17 Sep 2025 18:43:50 +0100	[thread overview]
Message-ID: <20250917174350.GW39973@ZenIV> (raw)
In-Reply-To: <CAJfpegvYJD8UUuukNY7oj7-PSu48y6hXn+iV9iHzrO4fdgWXQw@mail.gmail.com>

On Wed, Sep 17, 2025 at 07:27:25PM +0200, Miklos Szeredi wrote:
> On Wed, 17 Sept 2025 at 18:41, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > On Wed, Sep 17, 2025 at 05:42:18PM +0200, Miklos Szeredi wrote:
> > > > ... and if the call of ->d_revalidate() had been with parent locked, you've
> > > > just got a deadlock in that case.
> > >
> > > Why?
> >
> > Because the locking order on directories is "ancestors first"; you are trying
> > to grab an inode that is also a directory and might be anywhere in the tree
> > by that point - that's precisely what you are trying to check, isn't it?
> 
> But if parent is locked, it must not have been renamed, hence
> parent-child relationship holds.

Not if parent is held shared.

  reply	other threads:[~2025-09-17 17:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 15:30 [PATCH] fuse: prevent exchange/revalidate races Miklos Szeredi
2025-09-17 15:36 ` Al Viro
2025-09-17 15:42   ` Miklos Szeredi
2025-09-17 16:41     ` Al Viro
2025-09-17 17:27       ` Miklos Szeredi
2025-09-17 17:43         ` Al Viro [this message]
2025-09-17 17:45           ` Al Viro
2025-09-18  1:43 ` NeilBrown
2025-09-18 10:02   ` Miklos Szeredi
2025-09-19  8:20     ` Miklos Szeredi

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=20250917174350.GW39973@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mszeredi@redhat.com \
    --cc=neil@brown.name \
    /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.