Gleb Smirnoff 89042ff776 ng_l2tp: improve callout locking.
Apparently e62e4b85942 wasn't enough to close the race between
a queue being flushed by a packet and callout executing, because
the callouts used without a lock aren't 100% bulletproof. To close
the race use callout_init_mtx() for L2TP timers, and make sure that
all calls to ng_callout()/ng_uncallout() are done under the seq lock.

If used properly, a locked callout can be used transparently with
old netgraph KPI of ng_callout/ng_uncallout which predates locked
callouts.

While here, utilize ng_uncallout_drain() instead of ng_uncallout()
on the node shutdown.

PR:			241133
Reviewed by:		mjg, markj
Differential Revision:	https://reviews.freebsd.org/D31476
2021-09-10 11:27:19 -07:00
..
2021-09-10 11:27:04 -07:00
2021-09-10 11:27:04 -07:00
2021-05-19 11:04:08 -04:00
2019-10-07 22:40:05 +00:00
2021-09-10 11:27:19 -07:00
2021-07-28 09:35:09 -07:00
2021-01-27 21:22:51 +01:00