Page MenuHomeFreeBSD

pf: leave the epoch to purge unlinked rules
ClosedPublic

Authored by rcm on Wed, Sep 30, 1:22 AM.
Tags
None
Referenced Files
F174175591: D60160.id188276.diff
Thu, Oct 1, 3:58 AM
F174171328: D60160.id.diff
Thu, Oct 1, 3:14 AM
F174157594: D60160.id188148.diff
Thu, Oct 1, 12:20 AM
F174153274: D60160.diff
Wed, Sep 30, 11:33 PM
F174152671: D60160.diff
Wed, Sep 30, 11:26 PM
F174145885: D60160.id188148.diff
Wed, Sep 30, 10:12 PM
F174145522: D60160.diff
Wed, Sep 30, 10:08 PM
F174134801: D60160.id188148.diff
Wed, Sep 30, 8:24 PM

Details

Summary

pf_purge_thread() calls pf_purge_unlinked_rules() in the network
epoch, where sleeping is not allowed, and it takes pf_config_lock, an
sx lock. If a rule is being added at the time, the purge thread
can sleep on the lock, which panics with INVARIANTS.

Fixes: f92d9b1aad73 ("pflow: import from OpenBSD")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable