Skip to content
  • Gleb Smirnoff's avatar
    ng_l2tp: use callout_reset() instead of ng_callout() · ae04d304
    Gleb Smirnoff authored
    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:	89042ff7
    ae04d304