get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2224349,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2224349/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260417101132.379848-1-pablo@netfilter.org/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260417101132.379848-1-pablo@netfilter.org>",
    "list_archive_url": null,
    "date": "2026-04-17T10:11:31",
    "name": "[nf,v3] netfilter: nat: use kfree_rcu to release ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e92c27ce2c9c19710ea5a860957ec14298d558cd",
    "submitter": {
        "id": 1315,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/1315/?format=api",
        "name": "Pablo Neira Ayuso",
        "email": "pablo@netfilter.org"
    },
    "delegate": {
        "id": 11902,
        "url": "http://patchwork.ozlabs.org/api/1.2/users/11902/?format=api",
        "username": "strlen",
        "first_name": "Florian",
        "last_name": "Westphal",
        "email": "fw@strlen.de"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260417101132.379848-1-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 500300,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/500300/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=500300",
            "date": "2026-04-17T10:11:31",
            "name": "[nf,v3] netfilter: nat: use kfree_rcu to release ops",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/500300/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2224349/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2224349/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11997-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\tdkim=pass (2048-bit key;\n unprotected) header.d=netfilter.org header.i=@netfilter.org\n header.a=rsa-sha256 header.s=2025 header.b=rOoMEw6r;\n\tdkim-atps=neutral",
            "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-11997-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=\"rOoMEw6r\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=217.70.190.124",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=netfilter.org"
        ],
        "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 4fxrJm3WHpz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 20:11:52 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 8AA15300BBA9\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 10:11:45 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 86B2E3B19DA;\n\tFri, 17 Apr 2026 10:11:41 +0000 (UTC)",
            "from mail.netfilter.org (mail.netfilter.org [217.70.190.124])\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 E151A35F607;\n\tFri, 17 Apr 2026 10:11:39 +0000 (UTC)",
            "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id 68ADB600B9;\n\tFri, 17 Apr 2026 12:11:37 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776420701; cv=none;\n b=LKi1PnzwnKgHSIe2QmB9EgYKhaBWHrZ6aUOxZ24id218RjjRjrKuyMLHD7r+9ZOLAyoHudcn0EHkBaC6UuN0F8WdFQNCKu++Ot3ZbEMDc2oy2c36ui3guQGBwvdCSb6EAaVJ8wbB0sT2fJ7/cqPih+0vQexsiMJoJ+O4LedXYxY=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776420701; c=relaxed/simple;\n\tbh=VSVBMYgTh7yu/qZ8OnzwxDKi0m+ZaB2uzb2sWCnqc84=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=oD81+5eALUNnqJJngqQFOOnrOOpuZmDnLF5hLAHm5hgDMYz4MnJbcJnuUnFAa8HWY5IcN1j83WnBuo2NZED1dCmqk5PcoYvX3v4i+4pDiFoBsBVgvVNyWpVdrMQscI/D1cKa1J1U9Dvz26lOHix7gMJb1BtIONvmQu3chR+CW3c=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org;\n spf=pass smtp.mailfrom=netfilter.org;\n dkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=rOoMEw6r; arc=none smtp.client-ip=217.70.190.124",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org;\n\ts=2025; t=1776420697;\n\tbh=lx/+8I9WrQ7x3ADcx8lsBTwsCsblZH2vLM2Lr48dTmc=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=rOoMEw6rrqL9GUp17rAxtnf4kLQodlGVMVQNjOva69EGIkMWY592wu/SUIt1RHN/8\n\t 3Y7lCubsryItA7LqrCGvWW0HjXKvAXv6v/fYoVPUNAdwVz4KADuP/2XNti6gFLIgku\n\t hBJ7NJ+Ux7F5GQA2C8X8mO3CxGuSIqqDMhtv4ZWvwx6ZqlgJJtiVRHM0LD/Nj32NJi\n\t ugNLgUIBGnmAky+EVM/T4zsCGRonUEvgTtYCaBVqWN0FRSSN/mUC3Y4vcheeESKlZ6\n\t 28dogWvW5WP+rVAS7Q9TJ2cseW18go2WB9w+PXBS3RcCd4q5IVWcX6hiymbY+yl81Y\n\t uI4zmZ6Yr8X3Q==",
        "From": "Pablo Neira Ayuso <pablo@netfilter.org>",
        "To": "netfilter-devel@vger.kernel.org",
        "Cc": "fw@strlen.de,\n\tnetdev@vger.kernel.org",
        "Subject": "[PATCH nf,v3] netfilter: nat: use kfree_rcu to release ops",
        "Date": "Fri, 17 Apr 2026 12:11:31 +0200",
        "Message-ID": "<20260417101132.379848-1-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.47.3",
        "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": "Florian Westphal says:\n\n\"Historically this is not an issue, even for normal base hooks: the data\npath doesn't use the original nf_hook_ops that are used to register the\ncallbacks.\n\nHowever, in v5.14 I added the ability to dump the active netfilter\nhooks from userspace.\n\nThis code will peek back into the nf_hook_ops that are available\nat the tail of the pointer-array blob used by the datapath.\n\nThe nat hooks are special, because they are called indirectly from\nthe central nat dispatcher hook. They are currently invisible to\nthe nfnl hook dump subsystem though.\n\nBut once that changes the nat ops structures have to be deferred too.\"\n\nUpdate nf_nat_register_fn() to deal with partial exposition of the hooks\nfrom error path which can be also an issue for nfnetlink_hook.\n\nFixes: e2cf17d3774c (\"netfilter: add new hook nfnl subsystem\")\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\nv3: use kfree_rcu as suggested by AI in ip{6}tables_nat.\n\n net/ipv4/netfilter/iptable_nat.c  |  4 ++--\n net/ipv6/netfilter/ip6table_nat.c |  4 ++--\n net/netfilter/nf_nat_core.c       | 10 ++++++----\n 3 files changed, 10 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/net/ipv4/netfilter/iptable_nat.c b/net/ipv4/netfilter/iptable_nat.c\nindex a5db7c67d61b..625a1ca13b1b 100644\n--- a/net/ipv4/netfilter/iptable_nat.c\n+++ b/net/ipv4/netfilter/iptable_nat.c\n@@ -79,7 +79,7 @@ static int ipt_nat_register_lookups(struct net *net)\n \t\t\twhile (i)\n \t\t\t\tnf_nat_ipv4_unregister_fn(net, &ops[--i]);\n \n-\t\t\tkfree(ops);\n+\t\t\tkfree_rcu(ops, rcu);\n \t\t\treturn ret;\n \t\t}\n \t}\n@@ -100,7 +100,7 @@ static void ipt_nat_unregister_lookups(struct net *net)\n \tfor (i = 0; i < ARRAY_SIZE(nf_nat_ipv4_ops); i++)\n \t\tnf_nat_ipv4_unregister_fn(net, &ops[i]);\n \n-\tkfree(ops);\n+\tkfree_rcu(ops, rcu);\n }\n \n static int iptable_nat_table_init(struct net *net)\ndiff --git a/net/ipv6/netfilter/ip6table_nat.c b/net/ipv6/netfilter/ip6table_nat.c\nindex e119d4f090cc..5be723232df8 100644\n--- a/net/ipv6/netfilter/ip6table_nat.c\n+++ b/net/ipv6/netfilter/ip6table_nat.c\n@@ -81,7 +81,7 @@ static int ip6t_nat_register_lookups(struct net *net)\n \t\t\twhile (i)\n \t\t\t\tnf_nat_ipv6_unregister_fn(net, &ops[--i]);\n \n-\t\t\tkfree(ops);\n+\t\t\tkfree_rcu(ops, rcu);\n \t\t\treturn ret;\n \t\t}\n \t}\n@@ -102,7 +102,7 @@ static void ip6t_nat_unregister_lookups(struct net *net)\n \tfor (i = 0; i < ARRAY_SIZE(nf_nat_ipv6_ops); i++)\n \t\tnf_nat_ipv6_unregister_fn(net, &ops[i]);\n \n-\tkfree(ops);\n+\tkfree_rcu(ops, rcu);\n }\n \n static int ip6table_nat_table_init(struct net *net)\ndiff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c\nindex 83b2b5e9759a..74ec224ce0d6 100644\n--- a/net/netfilter/nf_nat_core.c\n+++ b/net/netfilter/nf_nat_core.c\n@@ -1222,9 +1222,11 @@ int nf_nat_register_fn(struct net *net, u8 pf, const struct nf_hook_ops *ops,\n \t\tret = nf_register_net_hooks(net, nat_ops, ops_count);\n \t\tif (ret < 0) {\n \t\t\tmutex_unlock(&nf_nat_proto_mutex);\n-\t\t\tfor (i = 0; i < ops_count; i++)\n-\t\t\t\tkfree(nat_ops[i].priv);\n-\t\t\tkfree(nat_ops);\n+\t\t\tfor (i = 0; i < ops_count; i++) {\n+\t\t\t\tpriv = nat_ops[i].priv;\n+\t\t\t\tkfree_rcu(priv, rcu_head);\n+\t\t\t}\n+\t\t\tkfree_rcu(nat_ops, rcu);\n \t\t\treturn ret;\n \t\t}\n \n@@ -1288,7 +1290,7 @@ void nf_nat_unregister_fn(struct net *net, u8 pf, const struct nf_hook_ops *ops,\n \t\t}\n \n \t\tnat_proto_net->nat_hook_ops = NULL;\n-\t\tkfree(nat_ops);\n+\t\tkfree_rcu(nat_ops, rcu);\n \t}\n unlock:\n \tmutex_unlock(&nf_nat_proto_mutex);\n",
    "prefixes": [
        "nf",
        "v3"
    ]
}