summaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorFlorian Westphal2018-12-28 01:24:49 +0100
committerGreg Kroah-Hartman2019-01-22 21:40:29 +0100
commit6567515e4a7c42931aefd2c503882839570b7546 (patch)
treef1f2611f655906c0fda74447699495d19703bd4c /net/netfilter
parentnetfilter: nf_conncount: speculative garbage collection on empty lists (diff)
downloadkernel-qcow2-linux-6567515e4a7c42931aefd2c503882839570b7546.tar.gz
kernel-qcow2-linux-6567515e4a7c42931aefd2c503882839570b7546.tar.xz
kernel-qcow2-linux-6567515e4a7c42931aefd2c503882839570b7546.zip
netfilter: nf_conncount: fix argument order to find_next_bit
commit a007232066f6839d6f256bab21e825d968f1a163 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_conncount.c2
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:
clear_bit(tree, data->pending_trees);
next_tree = (tree + 1) % CONNCOUNT_SLOTS;
- next_tree = find_next_bit(data->pending_trees, next_tree, CONNCOUNT_SLOTS);
+ next_tree = find_next_bit(data->pending_trees, CONNCOUNT_SLOTS, next_tree);
if (next_tree < CONNCOUNT_SLOTS) {
data->gc_tree = next_tree;