HomeFreeBSD

ipfilter: Avoid holding a lock while stopping

Description

ipfilter: Avoid holding a lock while stopping

Avoid calling _callout_stop_safe with a non-sleepable lock held when
detaching by initializing callout_init_rw() with CALLOUT_SHAREDLOCK, and
avoiding re-initialization inside the timer function.

PR: 282478
Reviewed by: cy, emaste, jhb, markj
Tested by: cy
Approved by: emaste (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47530

(cherry picked from commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d)
(cherry picked from commit a0618fbe19dfedcdf01b4c232fe6669ae19505c4)
(cherry picked from commit 650900cc2f607458d32d333bd7ab0aa10be13ba4)

Details

Provenance
jlduranAuthored on Nov 2 2024, 5:58 PM
Reviewer
cy
Differential Revision
D47530: ipfilter: Do not reinitialize lock in timer function
Parents
rG16d1a55b63f5: ipfilter: Include the IP address in error message
Branches
Unknown
Tags
Unknown