HomeFreeBSD

ng_l2tp: use callout_reset() instead of ng_callout()

Description

ng_l2tp: use callout_reset() instead of ng_callout()

The previous commit to this node falsely stated that locked callouts
are compatible with netgraph ng_callout KPI. They are not. An item
can be queued instead of being applied to the node, which results in
a mutex leak to the callout thread and later unlocked call into function
that expects to be called locked.

Potentially netgraph can be taught to handle locked callouts, but that
would bring a lot of complexity in it. Instead lets question necessity
of ng_callout() instead of callout_reset(). It protects against node
going away while callout is scheduled. But a node that drains all
callouts in the shutdown method (ng_l2tp does) is already protected.

Fixes: 89042ff77668

Details

Provenance
glebiusAuthored on Dec 3 2021, 4:57 PM
Parents
rG5f034a005435: fstab.5: spell encryption correctly
Branches
Unknown
Tags
Unknown