Skip to content

Commit 0c2a85e

Browse files
committed
netfilter: nf_tables: pass context to nft_set_destroy()
The patch that adds support for stateful expressions in set definitions require this. Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent c604cc6 commit 0c2a85e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4126,7 +4126,7 @@ static int nf_tables_newset(struct net *net, struct sock *nlsk,
41264126
return err;
41274127
}
41284128

4129-
static void nft_set_destroy(struct nft_set *set)
4129+
static void nft_set_destroy(const struct nft_ctx *ctx, struct nft_set *set)
41304130
{
41314131
if (WARN_ON(set->use > 0))
41324132
return;
@@ -4271,7 +4271,7 @@ EXPORT_SYMBOL_GPL(nf_tables_deactivate_set);
42714271
void nf_tables_destroy_set(const struct nft_ctx *ctx, struct nft_set *set)
42724272
{
42734273
if (list_empty(&set->bindings) && nft_set_is_anonymous(set))
4274-
nft_set_destroy(set);
4274+
nft_set_destroy(ctx, set);
42754275
}
42764276
EXPORT_SYMBOL_GPL(nf_tables_destroy_set);
42774277

@@ -7020,7 +7020,7 @@ static void nft_commit_release(struct nft_trans *trans)
70207020
nf_tables_rule_destroy(&trans->ctx, nft_trans_rule(trans));
70217021
break;
70227022
case NFT_MSG_DELSET:
7023-
nft_set_destroy(nft_trans_set(trans));
7023+
nft_set_destroy(&trans->ctx, nft_trans_set(trans));
70247024
break;
70257025
case NFT_MSG_DELSETELEM:
70267026
nf_tables_set_elem_destroy(&trans->ctx,
@@ -7451,7 +7451,7 @@ static void nf_tables_abort_release(struct nft_trans *trans)
74517451
nf_tables_rule_destroy(&trans->ctx, nft_trans_rule(trans));
74527452
break;
74537453
case NFT_MSG_NEWSET:
7454-
nft_set_destroy(nft_trans_set(trans));
7454+
nft_set_destroy(&trans->ctx, nft_trans_set(trans));
74557455
break;
74567456
case NFT_MSG_NEWSETELEM:
74577457
nft_set_elem_destroy(nft_trans_elem_set(trans),
@@ -8177,7 +8177,7 @@ static void __nft_release_tables(struct net *net)
81778177
list_for_each_entry_safe(set, ns, &table->sets, list) {
81788178
list_del(&set->list);
81798179
table->use--;
8180-
nft_set_destroy(set);
8180+
nft_set_destroy(&ctx, set);
81818181
}
81828182
list_for_each_entry_safe(obj, ne, &table->objects, list) {
81838183
nft_obj_del(obj);

0 commit comments

Comments
 (0)