mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
netfilter: nf_tables: avoid softlockup warnings in nft_chain_validate
This reverts commit314c828416("netfilter: nf_tables: can't schedule in nft_chain_validate"): Since commita60a5abe19("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>
This commit is contained in:
@@ -4171,6 +4171,8 @@ int nft_chain_validate(const struct nft_ctx *ctx, struct nft_chain *chain)
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
nft_chain_vstate_update(ctx, chain);
|
||||
@@ -4195,8 +4197,6 @@ static int nft_table_validate(struct net *net, const struct nft_table *table)
|
||||
err = nft_chain_validate(&ctx, chain);
|
||||
if (err < 0)
|
||||
goto err;
|
||||
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
err:
|
||||
|
||||
Reference in New Issue
Block a user