Revert "ipsec: Drain async ipsec_offload work when destroying a vnet"

This change can cause a deadlock in some cases, since it's possible for
VNET teardown to happen in the context of taskqueue_thread, and
ipsec_accel_sync() drains taskqueue_thread's work queue.

This reverts commit e196b12f4d.
This commit is contained in:
Mark Johnston 2024-08-30 15:00:16 +00:00
parent 06986e8999
commit 28294dc924
2 changed files with 1 additions and 4 deletions

View file

@ -386,7 +386,7 @@ ipsec_accel_sa_newkey_impl(struct secasvar *sav)
TASK_INIT(&tq->install_task, 0, ipsec_accel_sa_newkey_act, tq);
tq->sav = sav;
tq->install_vnet = curthread->td_vnet;
tq->install_vnet = curthread->td_vnet; /* XXXKIB liveness */
taskqueue_enqueue(taskqueue_thread, &tq->install_task);
}

View file

@ -8713,9 +8713,6 @@ key_vnet_destroy(void *arg __unused)
}
SAHTREE_WUNLOCK();
/* Wait for async work referencing this VNET to finish. */
ipsec_accel_sync();
key_freesah_flushed(&sahdrainq);
hashdestroy(V_sphashtbl, M_IPSEC_SP, V_sphash_mask);
hashdestroy(V_savhashtbl, M_IPSEC_SA, V_savhash_mask);