public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Horst Birthelmer <horst@birthelmer.com>
Cc: Bernd Schubert <bernd@bsbernd.com>,
	linux-fsdevel@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Horst Birthelmer <hbirthelmer@ddn.com>
Subject: Re: [PATCH] fuse: fix inode initialization race
Date: Thu, 26 Mar 2026 15:51:18 +0100	[thread overview]
Message-ID: <CAJfpegu9hjgwmCtM3xF6rjhY6jSvLnH+8wkr6a++RMPNDUpgWw@mail.gmail.com> (raw)
In-Reply-To: <20260318-fix-inode-init-race-v1-1-a7e58b2ddb9a@ddn.com>

On Wed, 18 Mar 2026 at 14:45, Horst Birthelmer <horst@birthelmer.com> wrote:
>
> From: Horst Birthelmer <hbirthelmer@ddn.com>
>
> Fix a race between fuse_iget() and fuse_reverse_inval_inode() where
> invalidation can arrive while an inode is being initialized, causing
> the invalidation to be lost.
>
> Add a waitqueue to make fuse_reverse_inval_inode() wait when it
> encounters an inode with attr_version == 0 (still initializing).
> When fuse_change_attributes_common() completes initialization, it
> wakes waiting threads.

This should be relatively rare, right?  In that case a single global
waitq and wake_up_all() would be better, imo.

Thanks,
Miklos

  parent reply	other threads:[~2026-03-26 14:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 13:43 [PATCH] fuse: fix inode initialization race Horst Birthelmer
2026-03-25  7:54 ` Bernd Schubert
2026-03-26 14:26   ` Christian Brauner
2026-03-26 14:51 ` Miklos Szeredi [this message]
2026-03-26 14:56   ` Horst Birthelmer
2026-03-26 15:06     ` 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=CAJfpegu9hjgwmCtM3xF6rjhY6jSvLnH+8wkr6a++RMPNDUpgWw@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=bernd@bsbernd.com \
    --cc=hbirthelmer@ddn.com \
    --cc=horst@birthelmer.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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