Page MenuHomeFreeBSD

fusefs: fix a deadlock caused by daemons that never initialize
ClosedPublic

Authored by asomers on Wed, Sep 16, 6:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 9, 5:43 PM
Unknown Object (File)
Tue, Oct 6, 11:48 PM
Unknown Object (File)
Sun, Oct 4, 10:57 PM
Unknown Object (File)
Sun, Oct 4, 9:25 AM
Unknown Object (File)
Sun, Oct 4, 4:34 AM
Unknown Object (File)
Sat, Oct 3, 9:12 AM
Unknown Object (File)
Sat, Oct 3, 5:34 AM
Unknown Object (File)
Sat, Oct 3, 12:15 AM
Subscribers

Details

Summary

If a daemon never responds to FUSE_INIT, but some process attempts to
access the mountpoint, and a different process (possibly the daemon
itself) attempts to unmount, a deadlock would result.

Fix this bug by blocking any thread that enters fuse_vfsop_root until
the daemon responds to FUSE_INIT or it times out. That will block any
thread attempting to lookup a path in the fuse mountpoint, before it
even gets to fuse VOPs. Remove less thorough initialization checks in
fuse_ticket_fetch and fuse_vnop_access that are no longer necessary.
And add a test case.

PR: 287431
MFC after: 2 weeks
Sponsored by: ConnectWise

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable