summaryrefslogtreecommitdiff
path: root/net/netfilter/nf_tables_api.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-06-27 19:45:22 +0300
committerJakub Kicinski <kuba@kernel.org>2023-06-27 19:45:22 +0300
commit3674fbf0451df0395f9fa18df3122927006a3829 (patch)
tree632690d6c74a7bedb166299bbc92059cd3a537f9 /net/netfilter/nf_tables_api.c
parent9d797ee2dce1e3e243bcc18dad7728df72fd11a4 (diff)
parent25a9c8a4431c364f97f75558cb346d2ad3f53fbb (diff)
downloadlinux-3674fbf0451df0395f9fa18df3122927006a3829.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in late fixes to prepare for the 6.5 net-next PR. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/netfilter/nf_tables_api.c')
-rw-r--r--net/netfilter/nf_tables_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 0911e6d5f5d2..9573a8fcad79 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -5344,6 +5344,8 @@ void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set,
nft_set_trans_unbind(ctx, set);
if (nft_set_is_anonymous(set))
nft_deactivate_next(ctx->net, set);
+ else
+ list_del_rcu(&binding->list);
set->use--;
break;
@@ -6795,7 +6797,9 @@ err_set_full:
err_element_clash:
kfree(trans);
err_elem_free:
- nft_set_elem_destroy(set, elem.priv, true);
+ nf_tables_set_elem_destroy(ctx, set, elem.priv);
+ if (obj)
+ obj->use--;
err_parse_data:
if (nla[NFTA_SET_ELEM_DATA] != NULL)
nft_data_release(&elem.data.val, desc.type);