Page MenuHomeFreeBSD

jaildesc: Publish the new fd only after the jaildesc is initialized
ClosedPublic

Authored by markj on Jul 5 2026, 9:34 PM.
Tags
None
Referenced Files
F171312946: D58049.diff
Thu, Sep 10, 8:20 AM
Unknown Object (File)
Wed, Sep 9, 6:39 AM
Unknown Object (File)
Tue, Sep 8, 11:30 PM
Unknown Object (File)
Tue, Sep 8, 3:07 PM
Unknown Object (File)
Tue, Sep 8, 8:18 AM
Unknown Object (File)
Tue, Sep 8, 8:03 AM
Unknown Object (File)
Mon, Sep 7, 1:47 PM
Unknown Object (File)
Mon, Sep 7, 6:01 AM
Subscribers

Details

Summary

jaildesc_alloc() finishes initializing the file structure only after it
is made visible from the file descriptor table via finit(). In that
window, other threads could try to perform operations on the descriptor
and thus access an incompletely initialized jaildesc.

Defer the finit() call until locks are initialized. While here,
simplify the error path for falloc_caps().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74533
Build 71416: arc lint + arc unit