Skip to content

Commit 7e7a817

Browse files
author
Florian Westphal
committed
netfilter: nf_tables: avoid softlockup warnings in nft_chain_validate
This reverts commit 314c828 ("netfilter: nf_tables: can't schedule in nft_chain_validate"): Since commit a60a5ab ("netfilter: nf_tables: allow iter callbacks to sleep") the iterator callback is invoked without rcu read lock held, so this cond_resched() is now valid. Signed-off-by: Florian Westphal <fw@strlen.de>
1 parent 8e1a1bc commit 7e7a817

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4171,6 +4171,8 @@ int nft_chain_validate(const struct nft_ctx *ctx, struct nft_chain *chain)
41714171
if (err < 0)
41724172
return err;
41734173
}
4174+
4175+
cond_resched();
41744176
}
41754177

41764178
nft_chain_vstate_update(ctx, chain);
@@ -4195,8 +4197,6 @@ static int nft_table_validate(struct net *net, const struct nft_table *table)
41954197
err = nft_chain_validate(&ctx, chain);
41964198
if (err < 0)
41974199
goto err;
4198-
4199-
cond_resched();
42004200
}
42014201

42024202
err:

0 commit comments

Comments
 (0)