get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2215853/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2215853,
    "url": "http://patchwork.ozlabs.org/api/patches/2215853/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260325131108.23045-9-fw@strlen.de/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/projects/26/?format=api",
        "name": "Netfilter Development",
        "link_name": "netfilter-devel",
        "list_id": "netfilter-devel.vger.kernel.org",
        "list_email": "netfilter-devel@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260325131108.23045-9-fw@strlen.de>",
    "list_archive_url": null,
    "date": "2026-03-25T13:11:02",
    "name": "[net,08/14] netfilter: nf_conntrack_expect: honor expectation helper field",
    "commit_ref": null,
    "pull_url": null,
    "state": "handled-elsewhere",
    "archived": true,
    "hash": "0ffc6d39b5767e71c1c2e7ab0d0d595929c7fbab",
    "submitter": {
        "id": 1025,
        "url": "http://patchwork.ozlabs.org/api/people/1025/?format=api",
        "name": "Florian Westphal",
        "email": "fw@strlen.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260325131108.23045-9-fw@strlen.de/mbox/",
    "series": [
        {
            "id": 497441,
            "url": "http://patchwork.ozlabs.org/api/series/497441/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=497441",
            "date": "2026-03-25T13:10:55",
            "name": "[net,01/14] netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497441/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2215853/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2215853/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11402-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "netfilter-devel@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11402-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=91.216.245.30",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=strlen.de",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc"
        ],
        "Received": [
            "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fgnnK62TKz1y1K\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 00:29:25 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 402E83117AA7\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 13:13:29 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 799003DC4D2;\n\tWed, 25 Mar 2026 13:12:11 +0000 (UTC)",
            "from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc\n [91.216.245.30])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id BF6603D9DAE;\n\tWed, 25 Mar 2026 13:12:09 +0000 (UTC)",
            "by Chamillionaire.breakpoint.cc (Postfix, from userid 1003)\n\tid 3EA706080C; Wed, 25 Mar 2026 14:12:08 +0100 (CET)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774444331; cv=none;\n b=FbOmM970oR55eyO42iG1d0dB8dJSPby9XjvBSFmPP3V4cAjxhdQOBQOwFiJUv54RywTr1YjwH9OZMRGcsKcmpxDp4TjL2ES7hfXjVak8nE9o52B6SQJ4+rhTw3GmgAg61xjtJBIhuhby6EqMNye7+xD5lFu25A81t0+KxUxIE5c=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774444331; c=relaxed/simple;\n\tbh=QPx8aZ4EIRNRk3EuhjhbxwWFUz1O04BIedHDikjetes=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=LiV0wM+KR5eh/7sfskjg8QZkiFyDeMt9j6gRQISdOy9ndn5ITwDMYqD4ctZFIPWLM8u1NuCYvOHR+uEagh+CvXEj8zdeWIAjADAjATRaQFQEkXVifYSEyZho24LLozRboUGe7gxyD5jKn2YAkNqQimvsXK60Y3EQKaaI5Fg5Cxk=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=strlen.de;\n spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc;\n arc=none smtp.client-ip=91.216.245.30",
        "From": "Florian Westphal <fw@strlen.de>",
        "To": "<netdev@vger.kernel.org>",
        "Cc": "Paolo Abeni <pabeni@redhat.com>,\n\t\"David S. Miller\" <davem@davemloft.net>,\n\tEric Dumazet <edumazet@google.com>,\n\tJakub Kicinski <kuba@kernel.org>,\n\t<netfilter-devel@vger.kernel.org>,\n\tpablo@netfilter.org",
        "Subject": "[PATCH net 08/14] netfilter: nf_conntrack_expect: honor expectation\n helper field",
        "Date": "Wed, 25 Mar 2026 14:11:02 +0100",
        "Message-ID": "<20260325131108.23045-9-fw@strlen.de>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260325131108.23045-1-fw@strlen.de>",
        "References": "<20260325131108.23045-1-fw@strlen.de>",
        "Precedence": "bulk",
        "X-Mailing-List": "netfilter-devel@vger.kernel.org",
        "List-Id": "<netfilter-devel.vger.kernel.org>",
        "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "From: Pablo Neira Ayuso <pablo@netfilter.org>\n\nThe expectation helper field is mostly unused. As a result, the\nnetfilter codebase relies on accessing the helper through exp->master.\n\nAlways set on the expectation helper field so it can be used to reach\nthe helper.\n\nThis is a preparation patches for follow up fixes.\n\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\nSigned-off-by: Florian Westphal <fw@strlen.de>\n---\n include/net/netfilter/nf_conntrack_expect.h |  2 +-\n net/netfilter/nf_conntrack_broadcast.c      |  2 +-\n net/netfilter/nf_conntrack_expect.c         |  6 +++++-\n net/netfilter/nf_conntrack_h323_main.c      | 12 ++++++------\n net/netfilter/nf_conntrack_helper.c         |  7 ++++++-\n net/netfilter/nf_conntrack_netlink.c        |  2 +-\n net/netfilter/nf_conntrack_sip.c            |  2 +-\n 7 files changed, 21 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h\nindex 165e7a03b8e9..1b01400b10bd 100644\n--- a/include/net/netfilter/nf_conntrack_expect.h\n+++ b/include/net/netfilter/nf_conntrack_expect.h\n@@ -40,7 +40,7 @@ struct nf_conntrack_expect {\n \t\t\t struct nf_conntrack_expect *this);\n \n \t/* Helper to assign to new connection */\n-\tstruct nf_conntrack_helper *helper;\n+\tstruct nf_conntrack_helper __rcu *helper;\n \n \t/* The conntrack of the master connection */\n \tstruct nf_conn *master;\ndiff --git a/net/netfilter/nf_conntrack_broadcast.c b/net/netfilter/nf_conntrack_broadcast.c\nindex a7552a46d6ac..d21576fcb1d6 100644\n--- a/net/netfilter/nf_conntrack_broadcast.c\n+++ b/net/netfilter/nf_conntrack_broadcast.c\n@@ -70,7 +70,7 @@ int nf_conntrack_broadcast_help(struct sk_buff *skb,\n \texp->expectfn             = NULL;\n \texp->flags                = NF_CT_EXPECT_PERMANENT;\n \texp->class\t\t  = NF_CT_EXPECT_CLASS_DEFAULT;\n-\texp->helper               = NULL;\n+\trcu_assign_pointer(exp->helper, nfct_help(ct)->helper);\n \n \tnf_ct_expect_related(exp, 0);\n \tnf_ct_expect_put(exp);\ndiff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c\nindex cfc2daa3fc7f..197a76d0b231 100644\n--- a/net/netfilter/nf_conntrack_expect.c\n+++ b/net/netfilter/nf_conntrack_expect.c\n@@ -309,6 +309,10 @@ struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me)\n }\n EXPORT_SYMBOL_GPL(nf_ct_expect_alloc);\n \n+/* This function can only be used from packet path, where accessing\n+ * master's helper is safe, because the packet holds a reference on\n+ * the conntrack object. Never use it from control plane.\n+ */\n void nf_ct_expect_init(struct nf_conntrack_expect *exp, unsigned int class,\n \t\t       u_int8_t family,\n \t\t       const union nf_inet_addr *saddr,\n@@ -325,7 +329,7 @@ void nf_ct_expect_init(struct nf_conntrack_expect *exp, unsigned int class,\n \texp->flags = 0;\n \texp->class = class;\n \texp->expectfn = NULL;\n-\texp->helper = NULL;\n+\trcu_assign_pointer(exp->helper, nfct_help(exp->master)->helper);\n \texp->tuple.src.l3num = family;\n \texp->tuple.dst.protonum = proto;\n \ndiff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c\nindex a2a0e22ccee1..3f5c50455b71 100644\n--- a/net/netfilter/nf_conntrack_h323_main.c\n+++ b/net/netfilter/nf_conntrack_h323_main.c\n@@ -643,7 +643,7 @@ static int expect_h245(struct sk_buff *skb, struct nf_conn *ct,\n \t\t\t  &ct->tuplehash[!dir].tuple.src.u3,\n \t\t\t  &ct->tuplehash[!dir].tuple.dst.u3,\n \t\t\t  IPPROTO_TCP, NULL, &port);\n-\texp->helper = &nf_conntrack_helper_h245;\n+\trcu_assign_pointer(exp->helper, &nf_conntrack_helper_h245);\n \n \tnathook = rcu_dereference(nfct_h323_nat_hook);\n \tif (memcmp(&ct->tuplehash[dir].tuple.src.u3,\n@@ -767,7 +767,7 @@ static int expect_callforwarding(struct sk_buff *skb,\n \tnf_ct_expect_init(exp, NF_CT_EXPECT_CLASS_DEFAULT, nf_ct_l3num(ct),\n \t\t\t  &ct->tuplehash[!dir].tuple.src.u3, &addr,\n \t\t\t  IPPROTO_TCP, NULL, &port);\n-\texp->helper = nf_conntrack_helper_q931;\n+\trcu_assign_pointer(exp->helper, nf_conntrack_helper_q931);\n \n \tnathook = rcu_dereference(nfct_h323_nat_hook);\n \tif (memcmp(&ct->tuplehash[dir].tuple.src.u3,\n@@ -1234,7 +1234,7 @@ static int expect_q931(struct sk_buff *skb, struct nf_conn *ct,\n \t\t\t\t&ct->tuplehash[!dir].tuple.src.u3 : NULL,\n \t\t\t  &ct->tuplehash[!dir].tuple.dst.u3,\n \t\t\t  IPPROTO_TCP, NULL, &port);\n-\texp->helper = nf_conntrack_helper_q931;\n+\trcu_assign_pointer(exp->helper, nf_conntrack_helper_q931);\n \texp->flags = NF_CT_EXPECT_PERMANENT;\t/* Accept multiple calls */\n \n \tnathook = rcu_dereference(nfct_h323_nat_hook);\n@@ -1306,7 +1306,7 @@ static int process_gcf(struct sk_buff *skb, struct nf_conn *ct,\n \tnf_ct_expect_init(exp, NF_CT_EXPECT_CLASS_DEFAULT, nf_ct_l3num(ct),\n \t\t\t  &ct->tuplehash[!dir].tuple.src.u3, &addr,\n \t\t\t  IPPROTO_UDP, NULL, &port);\n-\texp->helper = nf_conntrack_helper_ras;\n+\trcu_assign_pointer(exp->helper, nf_conntrack_helper_ras);\n \n \tif (nf_ct_expect_related(exp, 0) == 0) {\n \t\tpr_debug(\"nf_ct_ras: expect RAS \");\n@@ -1523,7 +1523,7 @@ static int process_acf(struct sk_buff *skb, struct nf_conn *ct,\n \t\t\t  &ct->tuplehash[!dir].tuple.src.u3, &addr,\n \t\t\t  IPPROTO_TCP, NULL, &port);\n \texp->flags = NF_CT_EXPECT_PERMANENT;\n-\texp->helper = nf_conntrack_helper_q931;\n+\trcu_assign_pointer(exp->helper, nf_conntrack_helper_q931);\n \n \tif (nf_ct_expect_related(exp, 0) == 0) {\n \t\tpr_debug(\"nf_ct_ras: expect Q.931 \");\n@@ -1577,7 +1577,7 @@ static int process_lcf(struct sk_buff *skb, struct nf_conn *ct,\n \t\t\t  &ct->tuplehash[!dir].tuple.src.u3, &addr,\n \t\t\t  IPPROTO_TCP, NULL, &port);\n \texp->flags = NF_CT_EXPECT_PERMANENT;\n-\texp->helper = nf_conntrack_helper_q931;\n+\trcu_assign_pointer(exp->helper, nf_conntrack_helper_q931);\n \n \tif (nf_ct_expect_related(exp, 0) == 0) {\n \t\tpr_debug(\"nf_ct_ras: expect Q.931 \");\ndiff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c\nindex ceb48c3ca0a4..294a6ffcbccd 100644\n--- a/net/netfilter/nf_conntrack_helper.c\n+++ b/net/netfilter/nf_conntrack_helper.c\n@@ -399,7 +399,7 @@ static bool expect_iter_me(struct nf_conntrack_expect *exp, void *data)\n \tconst struct nf_conntrack_helper *me = data;\n \tconst struct nf_conntrack_helper *this;\n \n-\tif (exp->helper == me)\n+\tif (rcu_access_pointer(exp->helper) == me)\n \t\treturn true;\n \n \tthis = rcu_dereference_protected(help->helper,\n@@ -421,6 +421,11 @@ void nf_conntrack_helper_unregister(struct nf_conntrack_helper *me)\n \n \tnf_ct_expect_iterate_destroy(expect_iter_me, NULL);\n \tnf_ct_iterate_destroy(unhelp, me);\n+\n+\t/* nf_ct_iterate_destroy() does an unconditional synchronize_rcu() as\n+\t * last step, this ensures rcu readers of exp->helper are done.\n+\t * No need for another synchronize_rcu() here.\n+\t */\n }\n EXPORT_SYMBOL_GPL(nf_conntrack_helper_unregister);\n \ndiff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c\nindex c156574e1273..a42d14290786 100644\n--- a/net/netfilter/nf_conntrack_netlink.c\n+++ b/net/netfilter/nf_conntrack_netlink.c\n@@ -3573,7 +3573,7 @@ ctnetlink_alloc_expect(const struct nlattr * const cda[], struct nf_conn *ct,\n \n \texp->class = class;\n \texp->master = ct;\n-\texp->helper = helper;\n+\trcu_assign_pointer(exp->helper, helper);\n \texp->tuple = *tuple;\n \texp->mask.src.u3 = mask->src.u3;\n \texp->mask.src.u.all = mask->src.u.all;\ndiff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c\nindex 4ab5ef71d96d..106b2f419e19 100644\n--- a/net/netfilter/nf_conntrack_sip.c\n+++ b/net/netfilter/nf_conntrack_sip.c\n@@ -1297,7 +1297,7 @@ static int process_register_request(struct sk_buff *skb, unsigned int protoff,\n \tnf_ct_expect_init(exp, SIP_EXPECT_SIGNALLING, nf_ct_l3num(ct),\n \t\t\t  saddr, &daddr, proto, NULL, &port);\n \texp->timeout.expires = sip_timeout * HZ;\n-\texp->helper = helper;\n+\trcu_assign_pointer(exp->helper, helper);\n \texp->flags = NF_CT_EXPECT_PERMANENT | NF_CT_EXPECT_INACTIVE;\n \n \thooks = rcu_dereference(nf_nat_sip_hooks);\n",
    "prefixes": [
        "net",
        "08/14"
    ]
}