Re: [PATCH next] fuse: avoid using the same file descriptor when cloning
From: Miklos Szeredi
Date: Mon Apr 20 2026 - 06:52:57 EST
On Sun, 19 Apr 2026 at 07:27, Edward Adam Davis <eadavis@xxxxxx> wrote:
>
> In fuse_dev_install_with_pq(), after updating the chan for the new device,
> the fch->connected value for the old device is set to 0. This logic is
> fundamentally flawed in cases where the new fd passed during a clone
> operation is identical to the device file's fd; specifically, during
> an unmount operation, this prevents fuse_conn_destroy() and subsequently
> fuse_chan_abort() from terminating pending requests, and the wake-up of
> the blocked_waitq is also consequently skipped. This triggers a timeout
> in fuse_chan_wait_aborted() [1].
>
> The original conditional logic has been restored to correctly identify
> the new device file.
Thanks for the patch. I fixed it differently in #for-next:
Move aborting the connection (setting fc->connected to zero) to
fuse_dev_install(), because it is not needed when the clone ioctl fails.
Thanks,
Miklos