Page MenuHomeFreeBSD

kern_dup(): Call filecaps_free_prep() in a write section.
ClosedPublic

Authored by markj on Mar 18 2020, 10:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 11, 12:28 PM
Unknown Object (File)
Fri, Sep 4, 6:32 AM
Unknown Object (File)
Sat, Aug 29, 12:08 AM
Unknown Object (File)
Fri, Aug 28, 4:58 PM
Unknown Object (File)
Thu, Aug 27, 12:31 PM
Unknown Object (File)
Wed, Aug 19, 4:35 PM
Unknown Object (File)
Wed, Aug 19, 2:04 PM
Unknown Object (File)
Tue, Aug 18, 8:20 PM
Subscribers

Details

Summary

filecaps_free_prep() bzeros the capabilities structure and we need to be
careful to synchronize with unlocked readers, which expect a consistent
rights structure.

I'm not really sure it's even worth keeping filecaps_free_prep(), since it's
doing some unnecessary work.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30003
Build 27816: arc lint + arc unit

Event Timeline

markj added reviewers: kib, mjg.
This revision is now accepted and ready to land.Mar 18 2020, 11:50 PM
mjg accepted this revision.EditedMar 19 2020, 3:07 AM

The original capsicum code introduced a lot of bzeroing which can probably be eliminated.