Page MenuHomeFreeBSD

fusefs: fix a deadlock caused by daemons that never initialize
Needs ReviewPublic

Authored by asomers on Wed, Sep 16, 6:36 PM.
Tags
None
Referenced Files
F172639991: D59737.diff
Sat, Sep 19, 9:48 PM
Unknown Object (File)
Thu, Sep 17, 6:42 AM
Unknown Object (File)
Thu, Sep 17, 4:07 AM
Unknown Object (File)
Thu, Sep 17, 1:05 AM
Unknown Object (File)
Thu, Sep 17, 12:57 AM
Unknown Object (File)
Wed, Sep 16, 11:41 PM
Unknown Object (File)
Wed, Sep 16, 11:38 PM
Unknown Object (File)
Wed, Sep 16, 11:36 PM
Subscribers

Details

Reviewers
js
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 Passed
Unit
No Test Coverage
Build Status
Buildable 76991
Build 73874: arc lint + arc unit