get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223989,
    "url": "http://patchwork.ozlabs.org/api/patches/2223989/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260416131453.308611-10-pablo@netfilter.org/",
    "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": "<20260416131453.308611-10-pablo@netfilter.org>",
    "list_archive_url": null,
    "date": "2026-04-16T13:14:51",
    "name": "[net,09/11] 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/people/1315/?format=api",
        "name": "Pablo Neira Ayuso",
        "email": "pablo@netfilter.org"
    },
    "delegate": {
        "id": 11902,
        "url": "http://patchwork.ozlabs.org/api/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/20260416131453.308611-10-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 500161,
            "url": "http://patchwork.ozlabs.org/api/series/500161/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=500161",
            "date": "2026-04-16T13:14:48",
            "name": "[net,01/11] netfilter: arp_tables: fix IEEE1394 ARP payload parsing in arp_packet_match()",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500161/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223989/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223989/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11977-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=AM5Nki2J;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11977-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=\"AM5Nki2J\"",
            "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 sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::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 4fxJWj17Fxz1yG9\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 23:19:29 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 9EF7C3022303\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 13:15:58 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A3B333CE4B9;\n\tThu, 16 Apr 2026 13:15:16 +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 DA5F114A4F0;\n\tThu, 16 Apr 2026 13:15:14 +0000 (UTC)",
            "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id 8D30D60253;\n\tThu, 16 Apr 2026 15:15:12 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776345316; cv=none;\n b=IjOLyT6d6dSClzIxE+R+o3rL065B1Tpqk4J2T8cJpAATEKfwpD8mGJRQOQmzLCXqGVQuskNOl36QnBV+2BmVZ9E//DivyP++WHM8uviPcSJbx9cXI2F5bWbbNL26nFmvUgdQ9OG6dK92moSTobRpmgaXkZaS6+mP0CkOlR94EPs=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776345316; 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=EHgiWfqA/mxNzWXN4/8BFzbN/w11wzlEjskz75PWUmsoJyMPzOpEJgJNIQcc1djRm8a/GRv10VMqJBCKTpKQdzRQ3Nb0/DyRYpr0ixQoQ8nwkmjbNibs+jawyeoZLySYoTELmvNEzROwN2Qv3M5BmZejloopvWN4Q8b4bbqFBfs=",
        "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=AM5Nki2J; 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=1776345313;\n\tbh=5QNR3mcO0k9+CBSb1u9iJUDckZR+6/nZaFLs5budQho=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=AM5Nki2JBXrv7bFaytTL9ui745c9FcaeNkDAh0azeh0vg6hsN5m+HX/uJXcGcTf6Q\n\t c5GJ1XmSc/vPxPucWHL3vcQ8l4VqlLDV8bciNIBVlOPgBmmI5zR6SWUc4/wSeairC5\n\t Dv7J8KhDpipgmtPBchQU8STJG8CCk9Y1LByPVYd9liP7+IpAi5dDDeGU4mJkf47sXB\n\t G2FaIqonWil1oEeeTFLqmy/H5ZuSMKtzefD6cSoAGkXZTz64ZHRubzZUnLlbSTTOPV\n\t KNr+7ofFTgbY2CQSxXL7XoXxsyAcHagvKg78eR8gjasGQhR2FunH7G4v3Pl98FUwuT\n\t ZfAhDT0O9cl0w==",
        "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 09/11] netfilter: nf_tables: use list_del_rcu for netlink\n hooks",
        "Date": "Thu, 16 Apr 2026 15:14:51 +0200",
        "Message-ID": "<20260416131453.308611-10-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260416131453.308611-1-pablo@netfilter.org>",
        "References": "<20260416131453.308611-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",
        "09/11"
    ]
}