Page MenuHomeFreeBSD

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

Authored by markj on Sun, Jul 5, 9:34 PM.
Tags
None
Referenced Files
F162331165: D58049.id181344.diff
Sun, Jul 12, 3:30 AM
F162330691: D58049.id181344.diff
Sun, Jul 12, 3:21 AM
F162304319: D58049.id181324.diff
Sat, Jul 11, 9:17 PM
F162303915: D58049.id181324.diff
Sat, Jul 11, 9:12 PM
Unknown Object (File)
Fri, Jul 10, 9:14 PM
Unknown Object (File)
Fri, Jul 10, 2:33 AM
Unknown Object (File)
Fri, Jul 10, 2:25 AM
Unknown Object (File)
Thu, Jul 9, 9:32 PM
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 Not Applicable
Unit
Tests Not Applicable