Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2224987/?format=api
{ "id": 2224987, "url": "http://patchwork.ozlabs.org/api/patches/2224987/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260420061924.69302-1-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": "<20260420061924.69302-1-pablo@netfilter.org>", "list_archive_url": null, "date": "2026-04-20T06:19:21", "name": "[nf,v7,1/4] netfilter: nf_tables: use list_del_rcu for netlink hooks", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "2eab15c5b5fcf7fe7f949ed4685a57122659c327", "submitter": { "id": 1315, "url": "http://patchwork.ozlabs.org/api/people/1315/?format=api", "name": "Pablo Neira Ayuso", "email": "pablo@netfilter.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260420061924.69302-1-pablo@netfilter.org/mbox/", "series": [ { "id": 500557, "url": "http://patchwork.ozlabs.org/api/series/500557/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=500557", "date": "2026-04-20T06:19:23", "name": "[nf,v7,1/4] netfilter: nf_tables: use list_del_rcu for netlink hooks", "version": 7, "mbox": "http://patchwork.ozlabs.org/series/500557/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2224987/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2224987/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <netfilter-devel+bounces-12033-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=CGb849z4;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-12033-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=\"CGb849z4\"", "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 sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzb5t73g3z1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 16:23:30 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id AC9F7303CE96\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 06:19:36 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 3BE5E3822AA;\n\tMon, 20 Apr 2026 06:19:35 +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 D69971891A9\n\tfor <netfilter-devel@vger.kernel.org>; Mon, 20 Apr 2026 06:19:31 +0000 (UTC)", "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id DB59360177\n\tfor <netfilter-devel@vger.kernel.org>; Mon, 20 Apr 2026 08:19:28 +0200 (CEST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776665974; cv=none;\n b=rYWQk8BZzpsd58M+7BzIEThFMxTIJKSlTNK/iKCVZZb/+7PLZGVGd2nsiLHoHH6SHAI9Q2laDUGCUdElEJrfBpub2xvzxJwk7+mKSahbrKvkfBrHwmgsN0zPkbge9a4S9hASY8+kz0GRzmggLnUVUx7CIe1qNY7fnvGgGIAMKAU=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776665974; c=relaxed/simple;\n\tbh=iMcD6b6Me6O6lojDg+I3aPhZLrZGIucvZy9bFgfcTzs=;\n\th=From:To:Subject:Date:Message-ID:MIME-Version;\n b=ZixQY7e3b2NbpDUlahHSZwLi1oSUrXxMJc+lRaAd6eTwMgkHBoiWNIrL9u2KdLQ/moZxi8yIiUmli5VimO1Isl3yH+l2tyTSVLu0KK6yL+KZmstxLeOJpZVK8DFfCOd7ytt+TnAI/Qzeiuwq8L0x9cRYHMifTxXucj/Q5cgxqew=", "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=CGb849z4; 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=1776665969;\n\tbh=ZrzHuiicz9yWjCZVh3K5jv2UywpHODoIAzsY1iJMJTs=;\n\th=From:To:Subject:Date:From;\n\tb=CGb849z445YNewgxBoeparQD/lxKG8ebz+1TFpcK3mWGaq93EWmfnNhgvv/rypim7\n\t 39+/NnSubK61RjTbI+3Cfs8DcrTK52vk1tybehuF3U4tDDb3zkGkDJ8AxBKDeiWz63\n\t yor87OyS5DJE70f9QdmAlH27NKtSEwjpXjC7EvdJeVIjT1Vq77IrjX0ajZSC6b5hmN\n\t JArxXvgcRXkt0fSyygYi4/zL2TfNbXuoRGYRJn9OSatnN1aV2hMAjFEm5/Im6QmXhm\n\t q6FuOBE0NTkMdNTdB+47UmVWtVlAcwx/2SlX3cBCiTZdBza89d6xSROd38l/g8x3EJ\n\t q5vZjCS0o7BBQ==", "From": "Pablo Neira Ayuso <pablo@netfilter.org>", "To": "netfilter-devel@vger.kernel.org", "Subject": "[PATCH nf,v7 1/4] netfilter: nf_tables: use list_del_rcu for netlink\n hooks", "Date": "Mon, 20 Apr 2026 08:19:21 +0200", "Message-ID": "<20260420061924.69302-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": "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 8537b94653d3..07e151245765 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@@ -2271,10 +2275,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@@ -2974,6 +2976,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@@ -8852,10 +8855,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@@ -8926,8 +8927,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@@ -8937,10 +8937,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@@ -9028,8 +9026,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@@ -9535,13 +9532,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": [ "nf", "v7", "1/4" ] }