Page MenuHomeFreeBSD

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

Authored by markj on Wed, Mar 18, 10:18 PM.

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

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj created this revision.Wed, Mar 18, 10:18 PM
markj edited the summary of this revision. (Show Details)Wed, Mar 18, 10:22 PM
markj added reviewers: kib, mjg.
kib accepted this revision.Wed, Mar 18, 11:50 PM
This revision is now accepted and ready to land.Wed, Mar 18, 11:50 PM
mjg accepted this revision.EditedThu, Mar 19, 3:07 AM

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

This revision was automatically updated to reflect the committed changes.