summaryrefslogtreecommitdiff
path: root/sys/net/if_pppx.c
diff options
context:
space:
mode:
authorVitaliy Makkoveev <mvs@cvs.openbsd.org>2021-12-07 01:19:48 +0000
committerVitaliy Makkoveev <mvs@cvs.openbsd.org>2021-12-07 01:19:48 +0000
commit8555e51e3db8c3e12459dddbfa6e478b93e55bc3 (patch)
tree9cfefaf5cff034a9d52bec54f25f5962905b9d87 /sys/net/if_pppx.c
parentfeaea13e9b89c8f232384c72e9d8368e2486d087 (diff)
Make `unp_msgcount' and `unp_file' protection with `unp_gc_lock'
rwlock(9). This save us from from races provided by unlocked access to the `f_count' which cause false marking alive socket as dead. We always modify `f_count' and `unp_msgcount' together so the `f_count' modification should also pass the `unp_gc_rwlock' before `unp_msgcount' increment and after `unp_msgcount' decrement. The locked `unp_file' assignment avoids us from drain unp_gc() run. This moves unp_gc() locking back when these wariables were protected with the same lock which was taken for all garbage collector run but uses another lock not `unp_lock'. ok kettenis@ bluhm@
Diffstat (limited to 'sys/net/if_pppx.c')
0 files changed, 0 insertions, 0 deletions