From nobody Sun Sep 08 17:59:46 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 4X1yR72zjSz5VZxc; Sun, 08 Sep 2024 17:59:47 +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 4X1yR713HLz4jTC; Sun, 8 Sep 2024 17:59:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725818387; 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=hYz4rO6RnE84q3LMh/LWHyqwalT8KQr/SgWoZNaiTlU=; b=TxL5fH0buddw0P6jzRNa1u6e6sazdFoHnG7Q2nfhOtxOlFWR9JOJAhFzpLeR6ru26YKT5A ib2wxhthyea31jXmfiuLPI6Ubo28u2U7U5HDVI07iv2nZXy9reB9EnXAllKSkoNI72YZAF KFWCzoFBP9Jfatwx0MVONiY02sLtLt0r9zYFjy3w0LXDk7fVB+oQY9qij/I8cK6K0LYBvp FX+5WKI0Rt9eSMlMoruq4eUBS3gM8t2iW9cdQsjcUDlvyuPg7k8E0vfs51lZ7xzuC6c+9Q VI6iNaTE9pt/T8Ur9GIPy+Q8+DFhLdmqU6qib5Ir3C4MQDYD9Cgor/x7a47kHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725818387; a=rsa-sha256; cv=none; b=gYzFx51X4NHLV9T8EkEtF1P3RepMvyjRUW4HtIEeEJDxz3UwmnTtSrkx27OLRsHl9Z2XRd QQX0GlVszMqFq+3pmIOGzOx4Esq6DM0Myda6KRxbLPXRBL1CiaH7FMucml1Zfq0ZFsBqWk a9YFPXJn+Jj2vnaeu0eWv0hJzRgLczi5DbJv3S8IFa26pX68r/8qnCeyRIzL/6ADVPY+dY j4Llyjy/GHYgyU1PVK2sffG8GXEE2bRQW7HA/ATevOHYkKEHfLfM5Oj62/sLUkKe2v2ILz 3/466pGFmBE66uFSw+AChrwrA/b1Yzfuk+gpS1scyxOdp4ibKs8t5cX/B30EQw== 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=1725818387; 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=hYz4rO6RnE84q3LMh/LWHyqwalT8KQr/SgWoZNaiTlU=; b=GIdLQq+hR+vJe7uNJlehB8lASJIMvuGODDLURhmtpEDMUMWD7qv9SSmOycDClYm69Z7Wqq xO+2zoEZGAtNXLKuGNYU3VXobKAfY86H9nuJ1x4I99F+qOlxD6Wkr3MY8s98LXBMu+dmTk z3Y8q8IZlw1rrng93/yvwt8m2fvh7u4Go1dPQp2nq5HqgBVjOAV9drRMLHbvnvHTPwhAB0 dBUT6PC+WUnHeayn9/5PZPUmW53BdC3rhnZAO4/U+7z2uR8joe0pEUQVFaJbCU3l0nJ7ZW QJcLEvxQYGvlyZgsVj2Vpgbp/b+4ojP5B63y1dmPzcLddvxHSbhtwCPpm45VDw== 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 4X1yR70fT6zTcH; Sun, 8 Sep 2024 17:59:47 +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 488HxksX043849; Sun, 8 Sep 2024 17:59:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 488Hxk9h043846; Sun, 8 Sep 2024 17:59:46 GMT (envelope-from git) Date: Sun, 8 Sep 2024 17:59:46 GMT Message-Id: <202409081759.488Hxk9h043846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 550133f1d488 - main - pf: ensure we exit net_epoch if pf_keth_anchor_nvcopyout() fails 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 550133f1d48882418d4ef6205020b8e06cfd23ec Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=550133f1d48882418d4ef6205020b8e06cfd23ec commit 550133f1d48882418d4ef6205020b8e06cfd23ec Author: Kristof Provost AuthorDate: 2024-09-06 14:47:27 +0000 Commit: Kristof Provost CommitDate: 2024-09-08 17:56:20 +0000 pf: ensure we exit net_epoch if pf_keth_anchor_nvcopyout() fails Reviewed by: markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46599 --- sys/netpfil/pf/pf_ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 64086bf08871..8d18da6cf0db 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2951,8 +2951,10 @@ DIOCGETETHRULES_error: NET_EPOCH_ENTER(et); PF_RULES_RUNLOCK(); nvl = pf_keth_rule_to_nveth_rule(rule); - if (pf_keth_anchor_nvcopyout(rs, rule, nvl)) + if (pf_keth_anchor_nvcopyout(rs, rule, nvl)) { + NET_EPOCH_EXIT(et); ERROUT(EBUSY); + } NET_EPOCH_EXIT(et); if (nvl == NULL) ERROUT(ENOMEM);