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

From: Yizhou Tang

Date: Tue Aug 18 2026 - 05:56:21 EST


On Tue, Aug 18, 2026 at 4:41 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Tue, 4 Aug 2026 at 11:18, Jun Yang <littleddfu@xxxxxxxxx> 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
>