diff options
author | Florian Westphal <fw@strlen.de> | 2018-12-27 19:24:49 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-12-28 20:45:22 -0500 |
commit | a007232066f6839d6f256bab21e825d968f1a163 (patch) | |
tree | ffc6d4e350dc64122d5b32f400bdf2c3f1645732 /net | |
parent | c80f10bc973af2ace6b1414724eeff61eaa71837 (diff) |
netfilter: nf_conncount: fix argument order to find_next_bit
Size and 'next bit' were swapped, this bug could cause worker to
reschedule itself even if system was idle.
Fixes: 5c789e131cbb9 ("netfilter: nf_conncount: Add list lock and gc worker, and RCU for init tree search")
Reviewed-by: Shawn Bohrer <sbohrer@cloudflare.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conncount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c index f0b05dfebc6e..7554c56b2e63 100644 --- a/net/netfilter/nf_conncount.c +++ b/net/netfilter/nf_conncount.c | |||
@@ -488,7 +488,7 @@ next: | |||
488 | clear_bit(tree, data->pending_trees); | 488 | clear_bit(tree, data->pending_trees); |
489 | 489 | ||
490 | next_tree = (tree + 1) % CONNCOUNT_SLOTS; | 490 | next_tree = (tree + 1) % CONNCOUNT_SLOTS; |
491 | next_tree = find_next_bit(data->pending_trees, next_tree, CONNCOUNT_SLOTS); | 491 | next_tree = find_next_bit(data->pending_trees, CONNCOUNT_SLOTS, next_tree); |
492 | 492 | ||
493 | if (next_tree < CONNCOUNT_SLOTS) { | 493 | if (next_tree < CONNCOUNT_SLOTS) { |
494 | data->gc_tree = next_tree; | 494 | data->gc_tree = next_tree; |