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
F174262714: D59737.diff
Thu, Oct 1, 8:16 PM
F174226612: D59737.diff
Thu, Oct 1, 12:48 PM
F174162385: D59737.diff
Thu, Oct 1, 1:18 AM
Unknown Object (File)
Wed, Sep 30, 7:05 AM
Unknown Object (File)
Tue, Sep 29, 1:53 PM
Unknown Object (File)
Tue, Sep 29, 10:15 AM
Unknown Object (File)
Tue, Sep 29, 6:15 AM
Unknown Object (File)
Mon, Sep 28, 8:06 PM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 76991
Build 73874: arc lint + arc unit

Event Timeline

sys/fs/fuse/fuse_vfsops.c
645

s/suceed/succeed/

This revision was not accepted when it landed; it landed in state Needs Review.Wed, Sep 23, 10:32 PM
This revision was automatically updated to reflect the committed changes.