From nobody Sat Feb 19 13:11:17 2022 X-Original-To: dev-commits-src-main@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 601BD19DFE05; Sat, 19 Feb 2022 13:11:18 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K188P6WlQz4W0c; Sat, 19 Feb 2022 13:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645276278; 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=qT28wSFH+gHIwC2CfilWN5HewUYAnFjziVAZRhFK0go=; b=KSNd7r3YP/ZqmppEUnAhHVwIgOhlT/SwISHQbBQrp8FxRK2z5XQpDvxAUG3UA4ECO6muZJ uYlVr4pOGrTsYyjl8jwkpXSkSHil2e9ut9ujMGBd7Lwc7PH0Xium8bNXpsPe3fGmxsLpIk LgJRqsfgxj66NJTz7tcNks6hMrV+sNYSmSFxOSKSYJYCht9HAp62G6wzK8MXyaEzvOl46C tCpajpcOQw+ADOR51HT/zJV8Sgtp2TcGxav12Jc0hQPQfDRKQzXeGxWCd/wPH6dHDgwR/Y hbxj4FK7oraqDvaTVxx75H6KUfNzLyBtmdKA++ZXFuPWm2c8Y4Dchv6cw0EHew== 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 97D9B155E; Sat, 19 Feb 2022 13:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21JDBHe2075344; Sat, 19 Feb 2022 13:11:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21JDBHhA075343; Sat, 19 Feb 2022 13:11:17 GMT (envelope-from git) Date: Sat, 19 Feb 2022 13:11:17 GMT Message-Id: <202202191311.21JDBHhA075343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 8a9269edd71a - main - ipsec: sprinkle CURVNET_ASSERT_SET List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a9269edd71a035384a5c97ab2d1a437691a3d87 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645276278; 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=qT28wSFH+gHIwC2CfilWN5HewUYAnFjziVAZRhFK0go=; b=GVNBe+55Io/rcu6BE3ThP1u96daj2nk8GfIdmy42A8Tvg+VvDW3PZvZ4AMZocKzSUICzeu 3e5fDk8JwqMDETnBfdAvcIuQtzAMRSO/fg9g7WwDzQZv3MxIUphFNVoh5eHWwbRvOmlKLO si0+YyFtx2/P5Ua3kt+bdnRdxH0V5zWHS3E/Y3bM7l+ch9Lboo2chgpOiOun10rffnQh7Z /EUhUy5difbv8esRv781vWeS1W2ZiIM86WqyKtUrFw4MT57h9ta7L4DEpEWqeCZO+ncvG/ pJnJ4yKDQP14FLDyQ+74LgYDxw6jjN1ejBU5CgIegk/sALLqCblgFrCnNxudLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645276278; a=rsa-sha256; cv=none; b=G0NWSADyTisYYYYIQzsbWWdh6Mer2G8mhludJODsHPyFleYaY5on1/Uitmv+t6Y5VrR3BA mqwGIVFE+3b4fqDUN/+n8IAqg+tWm0HLlNtis3MeD5XT7x7QkBBQDh0LR9zMXyqg0XXi+O ysTy6GY+FXbndAnkzF9L2sb3pqetsl2EVXLTTs+tIMD0+biA3fxCNgN2zKTrK+m4O/yhr/ 2yJS/9Eu8YxHc71JBez0fFaMO8ijoQoNe1VQUR3pJu8hk2bhio1Xe5dWUKmZ5AWJ1RlE1J wiAhvWnAXWHzzSSIMrQDQsIS7ab4fnNeiQgwuXuK3a7dOpdRKZBjJcITvn4rUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8a9269edd71a035384a5c97ab2d1a437691a3d87 commit 8a9269edd71a035384a5c97ab2d1a437691a3d87 Author: Mateusz Guzik AuthorDate: 2022-02-17 16:53:15 +0000 Commit: Mateusz Guzik CommitDate: 2022-02-19 13:10:41 +0000 ipsec: sprinkle CURVNET_ASSERT_SET Reviewed by: ae Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34314 --- sys/netipsec/key.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 480879a58aa4..7e75caf4f4ee 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -1357,6 +1357,7 @@ key_freesav(struct secasvar **psav) struct secasvar *sav = *psav; IPSEC_ASSERT(sav != NULL, ("null sav")); + CURVNET_ASSERT_SET(); if (SAV_DELREF(sav) == 0) return; @@ -1380,6 +1381,7 @@ key_unlinksav(struct secasvar *sav) KEYDBG(KEY_STAMP, printf("%s: SA(%p)\n", __func__, sav)); + CURVNET_ASSERT_SET(); SAHTREE_UNLOCK_ASSERT(); SAHTREE_WLOCK(); if (sav->state == SADB_SASTATE_DEAD) { @@ -2890,6 +2892,8 @@ key_freesah(struct secashead **psah) { struct secashead *sah = *psah; + CURVNET_ASSERT_SET(); + if (SAH_DELREF(sah) == 0) return;