HomeFreeBSD

pf: Fix incorrect rw_sleep() in pf_unload()

Description

pf: Fix incorrect rw_sleep() in pf_unload()

When we unload we don't hold the pf_rules_lock, so we cannot call rw_sleep()
with it, because it would release a lock we do not hold. There's no need for the
lock either, so we can just tsleep().

While here also make the same change in pf_purge_thread(), because it explicitly
takes the lock before rw_sleep() and then immediately releases it afterwards.

Details

Provenance
kpAuthored on
Parents
rS315135: MFC r314321:
Branches
Unknown
Tags
Unknown