HomeFreeBSD

fusefs: fix a kernel panic regarding SCM_RIGHTS

Description

fusefs: fix a kernel panic regarding SCM_RIGHTS

If the last copy of an open file resides within the socket buffer of a
unix-domain socket, then VOP_CLOSE will be called with no thread
information. Fix fusefs to handle that case, and add a regression test.

Also add a test case for writes to a file that lies within a sockbuf.
Along with close, a write from the writeback cache is the only other
operation I can think of that might apply to a file residing in a
sockbuf.

PR: 289686
Reported by: iron.udjin@gmail.com
MFC after: 1 week
Sponsored by: ConnectWise
Reviewed by: glebius, markj
Differential Revision: https://reviews.freebsd.org/D52625

Details

Provenance
asomersAuthored on Sep 19 2025, 4:02 PM
Reviewer
glebius
Differential Revision
D52625: fusefs: fix a kernel panic regarding SCM_RIGHTS
Parents
rG1f2a65222b88: Revert "kern/vfs_vnops.c: generalize the lock primitive for file foffset"
Branches
Unknown
Tags
Unknown