HomeFreeBSD

pfsync: fix pfsync_undefer_state() locking

Description

pfsync: fix pfsync_undefer_state() locking

pfsync_undefer_state() takes the bucket lock, but could get called from
places (e.g. from pfsync_update_state() or pfsync_delete_state()) where
we already held the lock.

As it can also be called from places where we don't yet hold the lock
create new locked variant for use when the lock is already held. Keep
using pfsync_undefer_state() where the lock must still be taken.

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

Details

Provenance
kpAuthored on Mar 20 2023, 1:29 PM
Parents
rG844ad2828a35: pfsync: add missing unlock in pfsync_defer_tmo()
Branches
Unknown
Tags
Unknown