Drop the KERNEL_LOCK() in pf_purge_thread().
authormpi <mpi@openbsd.org>
Mon, 3 Jul 2017 08:11:21 +0000 (08:11 +0000)
committermpi <mpi@openbsd.org>
Mon, 3 Jul 2017 08:11:21 +0000 (08:11 +0000)
commit6221d6df1b55bc08b5f314830697714ffa84deef
tree920846cde90315a883ab1ec611355d27e2e41981
parent662faea67ce0a44468b147efa806bb87d20c01d4
Drop the KERNEL_LOCK() in pf_purge_thread().

The NET_LOCK() is currently what guarantees that accesses to PF data
structures are serialized.

While here use rwsleep(9) instead of calling NET_LOCK()/NET_UNLOCK()
for every iteration.

Tested by Hrvoje Popovski, ok sashan@, visa@
sys/net/pf.c