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
Sponsored by: ConnectWise
Reviewed by: glebius, markj
Differential Revision: https://reviews.freebsd.org/D52625

(cherry picked from commit e043af9ca59608309cac2fd222c17f989ba0d35e)

Details

Provenance
asomersAuthored on Sep 19 2025, 4:02 PM
Reviewer
glebius
Differential Revision
D52625: fusefs: fix a kernel panic regarding SCM_RIGHTS
Parents
rG7dc691b70353: fusefs: fix the last_local_modify LLM/LastLocalModify.lookup/3 test
Branches
Unknown
Tags
Unknown