From owner-dev-commits-src-main@freebsd.org Fri Jul 2 08:30:31 2021 Return-Path: Delivered-To: dev-commits-src-main@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 CED90665EC5; Fri, 2 Jul 2021 08:30:31 +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 4GGSvW3fqwz3KHf; Fri, 2 Jul 2021 08:30:31 +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 5734F10ED1; Fri, 2 Jul 2021 08:30:31 +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 1628UVnd027323; Fri, 2 Jul 2021 08:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UVxx027322; Fri, 2 Jul 2021 08:30:31 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:31 GMT Message-Id: <202107020830.1628UVxx027322@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: 48d5b86364fa - main - pf: make DIOCGETSTATESNV iterations killable 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: 48d5b86364fa8e86318805d0078ccf9066e94ae8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:32 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=48d5b86364fa8e86318805d0078ccf9066e94ae8 commit 48d5b86364fa8e86318805d0078ccf9066e94ae8 Author: Mateusz Guzik AuthorDate: 2021-07-02 07:28:48 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 pf: make DIOCGETSTATESNV iterations killable Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_ioctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 928e4a1259cc..a802780277aa 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5059,6 +5059,11 @@ pf_getstates(struct pfioc_nv *nv) if (s->timeout == PFTM_UNLINKED) continue; + if (SIGPENDING(curthread)) { + PF_HASHROW_UNLOCK(ih); + ERROUT(EINTR); + } + nvls = pf_state_to_nvstate(s); if (nvls == NULL) { PF_HASHROW_UNLOCK(ih);