netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, fmancera@suse.de
Subject: Re: [PATCH nf] netfilter: nf_tables: limit maximum number of jumps/gotos per netns
Date: Thu, 23 Oct 2025 15:51:08 +0200	[thread overview]
Message-ID: <aPoyzCLGA6XFJ1wU@strlen.de> (raw)
In-Reply-To: <20251021234039.2505-1-pablo@netfilter.org>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> +		tbl = kmemdup(tbl, sizeof(nf_tables_sysctl_table), GFP_KERNEL);
> +		if (!tbl)
> +			return -ENOMEM;

[..]

> +static void nf_tables_sysctl_exit(struct net *net)
> +{
> +	struct nftables_pernet *nft_net = nft_pernet(net);
> +
> +	unregister_net_sysctl_table(nft_net->nf_tables_dir_header);

I think this is missing something like:

	const struct ctl_table *table = ft_net->nf_tables_dir_header->ctl_table_arg;

	unregister_net_sysctl_table(nft_net->nf_tables_dir_header);
	if (!net_eq(net, &init_net))
		kfree(table);
}

netfilter_log_sysctl_exit() et. al do this, so I don't think
unregister_net_sysctl_table() takes care of the arg.

  reply	other threads:[~2025-10-23 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 23:40 [PATCH nf] netfilter: nf_tables: limit maximum number of jumps/gotos per netns Pablo Neira Ayuso
2025-10-23 13:51 ` Florian Westphal [this message]
2025-10-24 14:38 ` Shaun Brady

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aPoyzCLGA6XFJ1wU@strlen.de \
    --to=fw@strlen.de \
    --cc=fmancera@suse.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).