From: Sasha Levin <sashal@kernel.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Sasha Levin <sashal@kernel.org>,
Junyoung Jang <graypanda.inzag@gmail.com>,
Gwanhyun Lee <gwanhyunlee@gmail.com>,
Joanne Koong <joannelkoong@gmail.com>,
Bernd Schubert <bernd@bsbernd.com>,
Dharmendra Singh <dsingh@ddn.com>,
Amir Goldstein <amir73il@gmail.com>,
fuse-devel@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 6.12.y] fuse: fix fuse_set_nowrite() race with parallel direct writes
Date: Mon, 23 Nov 2026 19:11:52 -0500 [thread overview]
Message-ID: <2026-11-23-1-daily-reply-0006@kernel.org> (raw)
In-Reply-To: <20261123141235.2477526-1-graypanda.inzag@gmail.com>
> @@ -1850,6 +1855,7 @@ void fuse_release_nowrite(struct inode *inode)
> spin_lock(&fi->lock);
> __fuse_release_nowrite(inode);
> spin_unlock(&fi->lock);
> + wake_up(&fi->page_waitq);
> }
fuse_do_setattr() drops NOWRITE with __fuse_release_nowrite() directly, so
it never gets this wake_up(). That path can run with the inode lock held
only shared: fuse_direct_IO() -> fuse_do_truncate() when i_size shrank after
fuse_dio_lock() (no writeback_cache). A parallel direct writer sleeping in
the new wait in fuse_set_nowrite() then misses its wakeup and hangs holding
i_rwsem shared. Could you do the wake_up() in __fuse_release_nowrite() (or
on that path as well)?
Since this is a stable-only fix (mainline only fixed it through
0c58a97f919c ("fuse: remove tmp folio for writebacks and internal rb
tree")), it also needs an ack from a FUSE maintainer.
> The patch also applies cleanly to linux-6.6.y (5139929c698c), though
> 6.6.y was not runtime-tested.
6.6.y and 6.1.y have the same bug from 153524053bbb ("fuse: allow
non-extending parallel direct writes on the same file"), so please send
v2 for 6.12.y, 6.6.y and 6.1.y together.
--
Thanks,
Sasha
prev parent reply other threads:[~2026-11-24 0:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 14:12 Junyoung Jang
2026-11-24 0:11 ` Sasha Levin [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=2026-11-23-1-daily-reply-0006@kernel.org \
--to=sashal@kernel.org \
--cc=amir73il@gmail.com \
--cc=bernd@bsbernd.com \
--cc=dsingh@ddn.com \
--cc=fuse-devel@lists.linux.dev \
--cc=graypanda.inzag@gmail.com \
--cc=gwanhyunlee@gmail.com \
--cc=joannelkoong@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=stable@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
all inboxes | Powered by JetHome®