get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223695,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223695/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260416013101.221555-12-pablo@netfilter.org/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<20260416013101.221555-12-pablo@netfilter.org>",
    "date": "2026-04-16T01:30:58",
    "name": "[net,11/14] netfilter: nf_tables: use list_del_rcu for netlink hooks",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2eab15c5b5fcf7fe7f949ed4685a57122659c327",
    "submitter": {
        "id": 1315,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/1315/?format=api",
        "name": "Pablo Neira Ayuso",
        "email": "pablo@netfilter.org"
    },
    "delegate": {
        "id": 11902,
        "url": "http://patchwork.ozlabs.org/api/1.1/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/20260416013101.221555-12-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 500063,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/500063/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=500063",
            "date": "2026-04-16T01:30:47",
            "name": "[net,01/14] netfilter: nft_fwd_netdev: use recursion counter in neigh egress path",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500063/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223695/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223695/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11957-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=eksrBlde;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11957-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=\"eksrBlde\"",
            "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 tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4fx0sZ10xWz1yG9\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 11:33:54 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id BB08B314F556\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 01:31:48 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 23F831E7C2E;\n\tThu, 16 Apr 2026 01:31:26 +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 6E94D23C368;\n\tThu, 16 Apr 2026 01:31:24 +0000 (UTC)",
            "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id 5C6C26024E;\n\tThu, 16 Apr 2026 03:31:22 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776303085; cv=none;\n b=HoNcldM2GUC6BMCa2F2P1wCIfHrjx35cquKcJGUmL4HmTlQNeYvTa0JbjPDTkJX9aDGmAzLsuBv89ac5gjvbH3k2MoH5291bVCB63EOlpkFPMAOeCi8yvSPZPFknCRJr75PaurDaB9lrrG23+z4m1yXAUWz1aq1XmiX0lfgD3bE=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776303085; c=relaxed/simple;\n\tbh=jWNtBiJWIpYxwolPoOMkNL7+aqGxrJiBMSP6x7yL/fU=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=nYlGwFIGDvaGaGzywIC5rISUHyWnbVCCEm/7QKiTZmQXzTfLdmrXwbmhPDV9bUdidI2lcI2Rbo/rNs3lmfoZrUFR94F8ZmoqB5X1gF54swHRpBh0XdJXYGJHHBjYpwKKYzr3mOmEp7Qh8wh4cxTmSPX7q7VHBXJ49Ovxow84xw8=",
        "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=eksrBlde; 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=1776303082;\n\tbh=5QNR3mcO0k9+CBSb1u9iJUDckZR+6/nZaFLs5budQho=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=eksrBldeXPrR7r2BuBufAznf9HsFFFg5h5rBEz6bjzHxaQ2rQj31u2jMGclfo2Tn1\n\t +Dn3yOa8S1VUaL/FMhZvBlMAVJim2scbGddr5R7PrJNtBBg6vcYnZMznfRl8OgGA1R\n\t XwIqMtHr+Q6BwRtPoDu4nBAfeyqxJpLweW4KYbV5IA8JNsJ09CK1rXviyv0Nam1Paz\n\t /SJMApQcXpP8EptTv1HMWs0fQdFVM5v4TTLXHNO+8nv94E4EPFDFS+RMIGB6Uul8r/\n\t 6WdDXq3MIpPy2pZLGqTfJOPaEiOkEMscwxkURdH6mJ1qnEhbgg/KIpC1EDbaYOV5aJ\n\t NANJDswyb24RQ==",
        "From": "Pablo Neira Ayuso <pablo@netfilter.org>",
        "To": "netfilter-devel@vger.kernel.org",
        "Cc": "davem@davemloft.net,\n\tnetdev@vger.kernel.org,\n\tkuba@kernel.org,\n\tpabeni@redhat.com,\n\tedumazet@google.com,\n\tfw@strlen.de,\n\thorms@kernel.org",
        "Subject": "[PATCH net 11/14] netfilter: nf_tables: use list_del_rcu for netlink\n hooks",
        "Date": "Thu, 16 Apr 2026 03:30:58 +0200",
        "Message-ID": "<20260416013101.221555-12-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260416013101.221555-1-pablo@netfilter.org>",
        "References": "<20260416013101.221555-1-pablo@netfilter.org>",
        "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: Florian Westphal <fw@strlen.de>\n\nnft_netdev_unregister_hooks and __nft_unregister_flowtable_net_hooks need\nto use list_del_rcu(), this list can be walked by concurrent dumpers.\n\nAdd a new helper and use it consistently.\n\nFixes: f9a43007d3f7 (\"netfilter: nf_tables: double hook unregistration in netns path\")\nSigned-off-by: Florian Westphal <fw@strlen.de>\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\n net/netfilter/nf_tables_api.c | 44 ++++++++++++++---------------------\n 1 file changed, 18 insertions(+), 26 deletions(-)",
    "diff": "diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c\nindex 8c42247a176c..090d4d688a33 100644\n--- a/net/netfilter/nf_tables_api.c\n+++ b/net/netfilter/nf_tables_api.c\n@@ -374,6 +374,12 @@ static void nft_netdev_hook_free_rcu(struct nft_hook *hook)\n \tcall_rcu(&hook->rcu, __nft_netdev_hook_free_rcu);\n }\n \n+static void nft_netdev_hook_unlink_free_rcu(struct nft_hook *hook)\n+{\n+\tlist_del_rcu(&hook->list);\n+\tnft_netdev_hook_free_rcu(hook);\n+}\n+\n static void nft_netdev_unregister_hooks(struct net *net,\n \t\t\t\t\tstruct list_head *hook_list,\n \t\t\t\t\tbool release_netdev)\n@@ -384,10 +390,8 @@ static void nft_netdev_unregister_hooks(struct net *net,\n \tlist_for_each_entry_safe(hook, next, hook_list, list) {\n \t\tlist_for_each_entry(ops, &hook->ops_list, list)\n \t\t\tnf_unregister_net_hook(net, ops);\n-\t\tif (release_netdev) {\n-\t\t\tlist_del(&hook->list);\n-\t\t\tnft_netdev_hook_free_rcu(hook);\n-\t\t}\n+\t\tif (release_netdev)\n+\t\t\tnft_netdev_hook_unlink_free_rcu(hook);\n \t}\n }\n \n@@ -2323,10 +2327,8 @@ void nf_tables_chain_destroy(struct nft_chain *chain)\n \n \t\tif (nft_base_chain_netdev(table->family, basechain->ops.hooknum)) {\n \t\t\tlist_for_each_entry_safe(hook, next,\n-\t\t\t\t\t\t &basechain->hook_list, list) {\n-\t\t\t\tlist_del_rcu(&hook->list);\n-\t\t\t\tnft_netdev_hook_free_rcu(hook);\n-\t\t\t}\n+\t\t\t\t\t\t &basechain->hook_list, list)\n+\t\t\t\tnft_netdev_hook_unlink_free_rcu(hook);\n \t\t}\n \t\tmodule_put(basechain->type->owner);\n \t\tif (rcu_access_pointer(basechain->stats)) {\n@@ -3026,6 +3028,7 @@ static int nf_tables_updchain(struct nft_ctx *ctx, u8 genmask, u8 policy,\n \t\t\t\tlist_for_each_entry(ops, &h->ops_list, list)\n \t\t\t\t\tnf_unregister_net_hook(ctx->net, ops);\n \t\t\t}\n+\t\t\t/* hook.list is on stack, no need for list_del_rcu() */\n \t\t\tlist_del(&h->list);\n \t\t\tnft_netdev_hook_free_rcu(h);\n \t\t}\n@@ -8903,10 +8906,8 @@ static void __nft_unregister_flowtable_net_hooks(struct net *net,\n \tlist_for_each_entry_safe(hook, next, hook_list, list) {\n \t\tlist_for_each_entry(ops, &hook->ops_list, list)\n \t\t\tnft_unregister_flowtable_ops(net, flowtable, ops);\n-\t\tif (release_netdev) {\n-\t\t\tlist_del(&hook->list);\n-\t\t\tnft_netdev_hook_free_rcu(hook);\n-\t\t}\n+\t\tif (release_netdev)\n+\t\t\tnft_netdev_hook_unlink_free_rcu(hook);\n \t}\n }\n \n@@ -8977,8 +8978,7 @@ static int nft_register_flowtable_net_hooks(struct net *net,\n \n \t\t\tnft_unregister_flowtable_ops(net, flowtable, ops);\n \t\t}\n-\t\tlist_del_rcu(&hook->list);\n-\t\tnft_netdev_hook_free_rcu(hook);\n+\t\tnft_netdev_hook_unlink_free_rcu(hook);\n \t}\n \n \treturn err;\n@@ -8988,10 +8988,8 @@ static void nft_hooks_destroy(struct list_head *hook_list)\n {\n \tstruct nft_hook *hook, *next;\n \n-\tlist_for_each_entry_safe(hook, next, hook_list, list) {\n-\t\tlist_del_rcu(&hook->list);\n-\t\tnft_netdev_hook_free_rcu(hook);\n-\t}\n+\tlist_for_each_entry_safe(hook, next, hook_list, list)\n+\t\tnft_netdev_hook_unlink_free_rcu(hook);\n }\n \n static int nft_flowtable_update(struct nft_ctx *ctx, const struct nlmsghdr *nlh,\n@@ -9079,8 +9077,7 @@ static int nft_flowtable_update(struct nft_ctx *ctx, const struct nlmsghdr *nlh,\n \t\t\t\tnft_unregister_flowtable_ops(ctx->net,\n \t\t\t\t\t\t\t     flowtable, ops);\n \t\t}\n-\t\tlist_del_rcu(&hook->list);\n-\t\tnft_netdev_hook_free_rcu(hook);\n+\t\tnft_netdev_hook_unlink_free_rcu(hook);\n \t}\n \n \treturn err;\n@@ -9586,13 +9583,8 @@ static void nf_tables_flowtable_notify(struct nft_ctx *ctx,\n \n static void nf_tables_flowtable_destroy(struct nft_flowtable *flowtable)\n {\n-\tstruct nft_hook *hook, *next;\n-\n \tflowtable->data.type->free(&flowtable->data);\n-\tlist_for_each_entry_safe(hook, next, &flowtable->hook_list, list) {\n-\t\tlist_del_rcu(&hook->list);\n-\t\tnft_netdev_hook_free_rcu(hook);\n-\t}\n+\tnft_hooks_destroy(&flowtable->hook_list);\n \tkfree(flowtable->name);\n \tmodule_put(flowtable->data.type->owner);\n \tkfree(flowtable);\n",
    "prefixes": [
        "net",
        "11/14"
    ]
}