From nobody Fri Aug 30 15:01:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WwLvC0mXrz5MjnC; Fri, 30 Aug 2024 15:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WwLvC0GZQz42Ml; Fri, 30 Aug 2024 15:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725030071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6tTmhTCn/oVmmmhpT4t5UbB+1HyOT52BmP8Xi9D6is=; b=MtuY5gbfzzJWW2WDy/MwPo6aUaDvEImKOAFL5LzQFa+6SvgC5nn/nfogkyLK3GkfdrIsjW 9fg5sPrIAfD3D3BznuKc6wt5UdDkEl1fFju1xm9sh4Wwp0qhjaiRkLajwg6drEGtHJ3Tiz aD8YMQ84yS8OE0hy3be81Ws3IOmCuLMMFuIBSe1cW8euzcEoRyT3yMUMWjhnwNJgfuEUBp Iz0XQA8DrzsMb1Y6Bdv42Txh2ECVTcs5Ubp0S0cSqmXqvTu4EwTXolKNdiRGUR8P3OgR2q G7dwbSk6KB98mzDcYMFg/WG28H1dCGHlNj+Pe9teEYlBa5uBPiu5E7mZ5tgEHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725030071; a=rsa-sha256; cv=none; b=FhAdxzC+sruIXJfZ0tKmglRwv+gYBRaWzwSQgFzCunyQq078LKeYX7YkghulGN6W3I2q8/ u50N6HTu8ERpocX8k0ynkt/epskfDYxbxfrL/UxXaEBoJWZNCnS6cmpqMsbfBX9V3yTb5t gsqPbQgMGo18v7NLWRUkQ+I2Jg3ya+z3gggeBfWZyZPEwkkhebqB8hP6pJny8ktGGIq+bA 0ShX5VAmQgM3hwWc5MPQTtp8wj52uWR3dgNAk5ya/05JjcgAwpcm+AT0DHxxI/xNhFs9wW B6h+xg2dm26BpwuG7DaUXfj7Vf7laqsGKV8jS5cmMS5i1wyTmkoQJ4lci7GEeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725030071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6tTmhTCn/oVmmmhpT4t5UbB+1HyOT52BmP8Xi9D6is=; b=o0cBfDbHF95x9YoluiR5EdyygE3AThBJoe/UNS/66tf6+M+xJQniLxQhH/JbPW95IJslUi 55dbpDC0L9Q3uPfsTBCwzPAi6abG4y0zqTtkz4Zle7ypK8HJtbUCb/R0rAavEi0N3AyK0+ eU2zSuO4BME3Y2C9lw+VX2MvMxUwNQDI6XpteoBcwR7oT+WoYo8409bsjcYdD5oNPYbPuu jMZc2JDMzeMklxctjGIUpRa28njHevGmlOQwfMHm4o1W9hJiO//PlOmuig/MsobuY4V903 kCthlWCwlmVKmB1RtU3xI8O6NgnQMqZ3DLxBFp6gFHPCFszCRqG8sj0XtBvniQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WwLvB6zvTz14xq; Fri, 30 Aug 2024 15:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47UF1Ar8018859; Fri, 30 Aug 2024 15:01:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47UF1Arg018856; Fri, 30 Aug 2024 15:01:10 GMT (envelope-from git) Date: Fri, 30 Aug 2024 15:01:10 GMT Message-Id: <202408301501.47UF1Arg018856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 28294dc92476 - main - Revert "ipsec: Drain async ipsec_offload work when destroying a vnet" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28294dc92476031a3ce5228501f1429192cb3c8f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=28294dc92476031a3ce5228501f1429192cb3c8f commit 28294dc92476031a3ce5228501f1429192cb3c8f Author: Mark Johnston AuthorDate: 2024-08-30 15:00:16 +0000 Commit: Mark Johnston CommitDate: 2024-08-30 15:00:16 +0000 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 e196b12f4d4d13982d42cf7841b77dca1405effa. --- sys/netipsec/ipsec_offload.c | 2 +- sys/netipsec/key.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c index 1ff91ec585c2..bbf98ac7a676 100644 --- a/sys/netipsec/ipsec_offload.c +++ b/sys/netipsec/ipsec_offload.c @@ -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); } diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index ad1d6164f158..5a3e5727bc2e 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -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);