Skip to content

Commit

Permalink
netfilter: nf_tables: fix scheduling-while-atomic splat
Browse files Browse the repository at this point in the history
commit 2024439 upstream.

nf_tables_check_loops() can be called from rhashtable list
walk so cond_resched() cannot be used here.

Fixes: 81ea010 ("netfilter: nf_tables: add rescheduling points during loop detection walks")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Florian Westphal authored and Greg Kroah-Hartman committed Mar 1, 2024
1 parent 97eaa29 commit d82ec75
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/netfilter/nf_tables_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -10044,13 +10044,9 @@ static int nf_tables_check_loops(const struct nft_ctx *ctx,
break;
}
}

cond_resched();
}

list_for_each_entry(set, &ctx->table->sets, list) {
cond_resched();

if (!nft_is_active_next(ctx->net, set))
continue;
if (!(set->flags & NFT_SET_MAP) ||
Expand Down

0 comments on commit d82ec75

Please sign in to comment.