revert pf.c r1.1152 again: move pf_purge out from under the kernel lock
authorbluhm <bluhm@openbsd.org>
Fri, 25 Nov 2022 20:27:53 +0000 (20:27 +0000)
committerbluhm <bluhm@openbsd.org>
Fri, 25 Nov 2022 20:27:53 +0000 (20:27 +0000)
commitaf09f97befaf183c8fe005c6f3670aeed4f82daa
tree96c70d979b8ed7c440c12c8f00a6b53413ab4b47
parentbb21efd54073efdf25d8c39120acaa75108f874a
revert pf.c r1.1152 again: move pf_purge out from under the kernel lock

Using systqmp for pf_purge creates a deadlock between pf_purge()
and ixgbe_stop() and possibly other drivers.  On systqmp pf(4) needs
netlock which the interface ioctl(2) is holding.  ix(4) waits in
sched_barrier() which is also scheduled on the systqmp task queue.

Removing the netlock from pf_purge() as a quick fix caused other
problems.

backout suggested by deraadt@
sys/net/pf.c
sys/net/pf_ioctl.c
sys/net/pfvar.h
sys/net/pfvar_priv.h