From owner-dev-commits-src-all@freebsd.org Tue Jun 29 07:25:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8425F644E57; Tue, 29 Jun 2021 07:25:01 +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 4GDbbK1jbsz4RVw; Tue, 29 Jun 2021 07:25:01 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0D0EE14F3D; Tue, 29 Jun 2021 07:25:01 +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 15T7P0xH068220; Tue, 29 Jun 2021 07:25:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7P0Gt068219; Tue, 29 Jun 2021 07:25:00 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:25:00 GMT Message-Id: <202106290725.15T7P0Gt068219@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: d26ef5c7ac83 - main - pf: make sure the dtrace probe has safe access to state 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: d26ef5c7ac830812f07a02787f25fed5d6f8609e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:25:01 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d26ef5c7ac830812f07a02787f25fed5d6f8609e commit d26ef5c7ac830812f07a02787f25fed5d6f8609e Author: Mateusz Guzik AuthorDate: 2021-06-28 19:32:20 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:53 +0000 pf: make sure the dtrace probe has safe access to state Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 69cdc75f0f41..39b032962e84 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6297,11 +6297,12 @@ done: } break; } - if (s) - PF_STATE_UNLOCK(s); SDT_PROBE4(pf, ip, test, done, action, reason, r, s); + if (s) + PF_STATE_UNLOCK(s); + return (action); } #endif /* INET */