diff options
| author | Hengyu Liang <hengyul@cs.unc.edu> | 2026-10-17 05:46:01 -0400 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-11-19 18:26:00 +0100 |
| commit | 2eb2329f9ce7f29f227656cc2686fe6f1879d11c (patch) | |
| tree | e37a84595b841a5fa7b6a69eb992f1935a30b7d6 /rust/kernel/alloc | |
| parent | fea42fae07822cd717ba4b3082834bb5908bf911 (diff) | |
fuse: preserve ENOTCONN after failed initialization and disconnect
Commit 794e811d1443 ("fuse: split out filesystem part of request
sending") moved the INIT failure check into fuse_req_prep(), before
the channel checks whether it is still connected.
If a daemon closes /dev/fuse before replying to INIT, aborting the
channel completes INIT with an error. stat() and open() on the mount
then return ECONNREFUSED instead of the previous ENOTCONN. The same
change occurs when INIT is rejected before the daemon closes the fd.
Record INIT failure in the channel before publishing initialized, and
check it in fuse_get_req() after waiting for initialization and checking
for disconnection. This preserves ECONNREFUSED for failed INIT while
the device remains open, and restores ENOTCONN after disconnection.
Set the failure flag only while the channel is connected, since abort
also marks it initialized to wake waiters after a successful INIT.
Fixes: 794e811d1443 ("fuse: split out filesystem part of request sending")
Cc: stable@vger.kernel.org
Signed-off-by: Hengyu Liang <hengyul@cs.unc.edu>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions
