From nobody Thu May 08 13:10:43 2025 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 4ZtXYw1bspz5wJDY; Thu, 08 May 2025 13:10:44 +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 4ZtXYw09ycz3LlZ; Thu, 08 May 2025 13:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709844; 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=m763k5Q+b8pKTy2kl0Jeh0mErk0lckBBbiO58eOQgx4=; b=IYVljSn/4/YQ5d5SortR+3+sHTXRNIxGU5wY+0e3nyj8BYMMNP8eTzHMNa75KbvgEsNX9C Peyza1mltE6Wy3PqVf4PtwyhdVizAedTAljegC92lW1C4wWWtQW+whtTvbJOf92nTl9VKs nvE2UK/EcfZnOqCv5z7rfnZKMiAEDGvOu+mLhqgVbE5JUwbZCJLHPcxNU+tlsWqi8q1ulo Jm29OaB5cnZjOeppws+ficJ5cgDGa09312K/6ro1nw7FlSWvdrr73UBV90m1/OKS8PEyx8 Eq5sUHeaFGpdJB/V364VIzlXpgac2Qfq6XqyUfQKT2kVu+EV6lplQEpFhIgP5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746709844; 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=m763k5Q+b8pKTy2kl0Jeh0mErk0lckBBbiO58eOQgx4=; b=hJmmd3z+BgUG+FEttxvwpMXsWifJeo7t0lz+vG6CbPkoIKYqgtUTKJhQkVNEUXw8obYve2 fy/4FiWomDa4YUJSmNNbY+Q5r8SBLj2g9uIZJpIfQAbcSSRyYwM/YhFhkKiUMGA9SY8on2 qYE2gZ9KU4jo6fA4r6jyS4NL1WU40ZfcaojCxy3CG96Xr/A2uqBqMixcWcIJ4jEQ1Zay8D Dn8WbTUae849NtZLhwhGKsSWIf66dh/R39gfjIiK9WaLhoex7OjJwAGwPTAD8zKRyijTag s7c/24Rab24o6gW1NxMN7HKAD51LK6vCsBz+tvCSM8uZ0zbxmmwsg6BjM5+LZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746709844; a=rsa-sha256; cv=none; b=Zpexv1ll6evGb654xuf/LHG0ImgH+qXQOxzh4ACDUcA2JTpNO3yKx7RW3AwHjYrII29TKI JxLOBWB1KbHu7RmPonGH8PN9NMm+kkO+ZzrN+31g9PGLwlPYJ8Q9mKz236OvwuMBLMQyWh /tUc41PqJbGyWJOmEhZJdGoMbt/iBfCN87Wuh8qv+/HSraJ1XJ7JIcfBiIYDnPUq6fh1LV ZzahhVtEE8M4P7gzxIdufQSHCtFQlYK6RVMii9FWmBK0H3Q/Tt3/uvnXF2yIE7qS6cfLaq AfDSdIKK0EWGEnH1ksfpOSy6Zj0m2Ibig0SsyB9oV6TfozqjHsR0zxjG4BYdxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4ZtXYv5y4Mz1gC; Thu, 08 May 2025 13:10:43 +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 548DAhcs047175; Thu, 8 May 2025 13:10:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548DAh1I047172; Thu, 8 May 2025 13:10:43 GMT (envelope-from git) Date: Thu, 8 May 2025 13:10:43 GMT Message-Id: <202505081310.548DAh1I047172@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: 93a955fcc313 - main - pf: fix incorrect list use in pflow_jail_remove() 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 93a955fcc3137772c06195a19e5a1d85982fec27 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=93a955fcc3137772c06195a19e5a1d85982fec27 commit 93a955fcc3137772c06195a19e5a1d85982fec27 Author: Kristof Provost AuthorDate: 2025-05-06 15:36:03 +0000 Commit: Kristof Provost CommitDate: 2025-05-08 13:10:25 +0000 pf: fix incorrect list use in pflow_jail_remove() We remove items from V_pflowif_list while iterating it (via pflow_destroy()), so we must use the _SAFE macro. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pflow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pflow.c b/sys/netpfil/pf/pflow.c index 00890589814d..d30b80c88d89 100644 --- a/sys/netpfil/pf/pflow.c +++ b/sys/netpfil/pf/pflow.c @@ -191,10 +191,10 @@ pflow_jail_remove(void *obj, void *data __unused) #ifdef VIMAGE const struct prison *pr = obj; #endif - struct pflow_softc *sc; + struct pflow_softc *sc, *tmp; CURVNET_SET(pr->pr_vnet); - CK_LIST_FOREACH(sc, &V_pflowif_list, sc_next) { + CK_LIST_FOREACH_SAFE(sc, &V_pflowif_list, sc_next, tmp) { pflow_destroy(sc->sc_id, false); } CURVNET_RESTORE();