diff options
author | glebius <glebius@FreeBSD.org> | 2014-02-14 10:05:21 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-02-14 10:05:21 +0000 |
commit | 1ea1d562a3cd9a58f90832eaff87d94ede9b5bfc (patch) | |
tree | d75437f1387850beb0727915096f9a956d708eb3 /contrib/atf/atf-c++/tests_test.cpp | |
parent | e7560978e3e057a99776d754c463415dceea5dd7 (diff) | |
download | FreeBSD-src-1ea1d562a3cd9a58f90832eaff87d94ede9b5bfc.zip FreeBSD-src-1ea1d562a3cd9a58f90832eaff87d94ede9b5bfc.tar.gz |
Once pf became not covered by a single mutex, many counters in it became
race prone. Some just gather statistics, but some are later used in
different calculations.
A real problem was the race provoked underflow of the states_cur counter
on a rule. Once it goes below zero, it wraps to UINT32_MAX. Later this
value is used in pf_state_expires() and any state created by this rule
is immediately expired.
Thus, make fields states_cur, states_tot and src_nodes of struct
pf_rule be counter(9)s.
Thanks to Dennis for providing me shell access to problematic box and
his help with reproducing, debugging and investigating the problem.
Thanks to: Dennis Yusupoff <dyr smartspb.net>
Also reported by: dumbbell, pgj, Rambler
Sponsored by: Nginx, Inc.
Diffstat (limited to 'contrib/atf/atf-c++/tests_test.cpp')
0 files changed, 0 insertions, 0 deletions