Page MenuHomeFreeBSD

pf: modify pfik_flags atomically
Needs ReviewPublic

Authored by rcm on Mon, Sep 28, 7:58 PM.

Details

Reviewers
kp
Summary

The purge thread sets PFI_IFLAG_REFS on the interfaces that states
refer to without the rules lock, under which the other flags are
changed. The updates can interleave, so that a "set skip on" is lost,
or outlives its removal, until the next ruleset load.

Use atomic operations to modify the flags. In the purge thread, only
write if the flag is not already set.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rcm requested review of this revision.Mon, Sep 28, 7:58 PM
rcm created this revision.
rcm created this object with visibility "rcm (R. Christian McDonald)".
rcm created this object with edit policy "rcm (R. Christian McDonald)".
rcm retitled this revision from pf: update pfik_flags atomically to pf: modify pfik_flags atomically.
rcm edited the summary of this revision. (Show Details)
rcm edited the test plan for this revision. (Show Details)
rcm added a reviewer: kp.
rcm changed the visibility from "rcm (R. Christian McDonald)" to "Public (No Login Required)".
rcm changed the edit policy from "rcm (R. Christian McDonald)" to "All Users".