Commit 2888b080 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: nftables: fix possible double hook unregistration with table owner

Skip hook unregistration of owner tables from the netns exit path,
nft_rcv_nl_event() unregisters the table hooks before tearing down
the table content.

Fixes: 6001a930 ("netfilter: nftables: introduce table ownership")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 9cc0001a
......@@ -9028,8 +9028,12 @@ static void __nft_release_hooks(struct net *net)
{
struct nft_table *table;
list_for_each_entry(table, &net->nft.tables, list)
list_for_each_entry(table, &net->nft.tables, list) {
if (nft_table_has_owner(table))
continue;
__nft_release_hook(net, table);
}
}
static void __nft_release_table(struct net *net, struct nft_table *table)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment