freebsd_network: Unlock taskqueues before final destruction.

This is needed for MTX_SPIN taskqueues.
This commit is contained in:
Augustin Cavalier 2022-07-06 14:47:03 -04:00
parent ab52604b90
commit 19453ce798

View File

@ -182,6 +182,9 @@ taskqueue_free(struct taskqueue *queue)
taskqueue_terminate(queue->tq_threads, queue);
KASSERT(TAILQ_EMPTY(&queue->tq_active), ("Tasks still running?"));
KASSERT(queue->tq_callouts == 0, ("Armed timeout tasks"));
#ifdef __HAIKU__
TQ_UNLOCK(queue);
#endif
mtx_destroy(&queue->tq_mutex);
free(queue->tq_threads, M_TASKQUEUE);
free(queue->tq_name, M_TASKQUEUE);