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)

(cherry picked from commit 53247cdf12449e90f6736ae563e4cce8315c923f)

Details

Provenance
kpAuthored on Mar 20 2023, 1:29 PM
Parents
rGf0cea48cb780: contrib/tzdata: import tzdata 2023b
Branches
Unknown
Tags
Unknown