From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82FB3C2F3D9 for ; Mon, 21 Jan 2019 14:20:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5185A20861 for ; Mon, 21 Jan 2019 14:20:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548080415; bh=yL1CacxamL0wJ+5aQZaTxSvekUFmZRQsUAFnFx7N4Ws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=a50vq+5+uSGHJUf34TBil/yavij9M9xsWT37KS5LYcU6Gqwt9Rb0t3x8eCqhBVSCp cUK8IJN7afLQN+nZSHANBfTKetwLUloA6q19DoclKf4eM29tVdu6oMI1U9CZjfVDKb vQPMTHxOBMlCZbE89xTF66TglMRF7IDaBWVzh0eE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729277AbfAUNsP (ORCPT ); Mon, 21 Jan 2019 08:48:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:58014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728875AbfAUNsO (ORCPT ); Mon, 21 Jan 2019 08:48:14 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42B7F2063F; Mon, 21 Jan 2019 13:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548078493; bh=yL1CacxamL0wJ+5aQZaTxSvekUFmZRQsUAFnFx7N4Ws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z1/+LEW54xQR3VzNd3eq1Z12EvNV1MbplJtwh/JGiOQpOU1cvt8wmPLzIELi2P5gN /lH/hj4RFkJLWJyv6ykmfnz9jfYnD6hJTa3SSGuWBjuWWVpTVXapPZEJwIbH/pe/MN 7yY3FAcfH4V8y7n4+v7T7NVEDmI2epwOeEXe4eGs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shawn Bohrer , Florian Westphal , Pablo Neira Ayuso Subject: [PATCH 4.20 013/111] netfilter: nf_conncount: fix argument order to find_next_bit Date: Mon, 21 Jan 2019 14:42:07 +0100 Message-Id: <20190121122457.181059548@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121122455.819406896@linuxfoundation.org> References: <20190121122455.819406896@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Westphal 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 Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nf_conncount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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;