Re: [PATCH 1/2] fuse: set FR_PENDING under fiq->lock in fuse_chan_resend()

Yizhou Tang <[email protected]>
Newsgroups dev.linux.lists.fuse-devel,org.kernel.vger.linux-kernel
Message-ID <CAOB9oOYwBcVjpGsThQ1aUPap5vrOhQFrpKL6NW_sOXBKvN=6Ug@mail.gmail.com>
On Tue, Aug 18, 2026 at 4:41 PM Miklos Szeredi <[email protected]> wrote:
>
> On Tue, 4 Aug 2026 at 11:18, Jun Yang <[email protected]> wrote:
>
> > Publish FR_PENDING under fiq->lock, immediately before the splice that
> > actually puts the requests on fiq->pending, and fold the intr_entry cleanup
> > into the same locked walk. A waiter that arrives while the requests are
> > still on the stack now sees FR_PENDING clear, so fuse_remove_pending_req()
> > returns false and it falls through to wait_event(FR_FINISHED) -- the same
> > handling a request already handed to userspace gets. The !fiq->connected
> > path no longer needs to clear the bit, because it was never set.
>
> Thanks for the report and patch.
>
> Commit ed9c881f3b49 ("fuse: fix race between interrupt and resend")
> found in git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git
> #for-next contains a very similar fix.

Hi Miklos,

Thanks for your response.
I agree with your patch and have already started testing it.

Best regards,
Yi

>
> Thanks,
> Miklos
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.