Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6259910imu; Mon, 21 Jan 2019 06:01:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN78RBTG1BVXPjQkv6aIcfpB+xyz1YX3nBtALhG+6i0VSoOxBTh+k8n+bi3HMVGJGhUAGi7J X-Received: by 2002:a62:44d8:: with SMTP id m85mr30146148pfi.164.1548079289430; Mon, 21 Jan 2019 06:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548079289; cv=none; d=google.com; s=arc-20160816; b=X5C8ko3LZpptqq5m0UxeOdLQCVaKZ8hw99+9MaiG5XuTtTHOiqkrVA8wjRi3ihfz8R u8EX3AVq/9MUX6eoYnG+LrWGjoE06gQ8Yp5poucvGsIm5qn42XNAZmxlh8tOTinNvc9e kBW+6PnrXAoZB9zMRAD3j9o4s9smFJW8u2p6+dVt9y5rK2jgVB2epVHKqbNwWrlQ3XFY M/9vojBR26bj6VGHoZVNqfjgkctbE/9A9H7A0fTdHjYjNRDcbhnVb65KbFzOdO4L6rso dns2hjD8L+iDJhV+Tr8bgBOd3c7MlIGKxH6PILhc4I+FRthpY4o6WRzgYYyQe1Dcx7tx IabQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2ygE2cRri6bpinPgo+LO0l3IgAi4yUlQr/q0aYy1HIE=; b=URDMC9hVVYXbUnsmcmvD0VfWltnEGLH/G7FV6NRGB0UMpXU+xIM5F/aGGdoTMRU6uL CkHeI1yu53k8SbdhBV7+T+iw9x31Q6plwxbc4QGTvwbExtGo7ay7fKLcIeWitib2tpd7 JY/aj0LVjMmgubaPp8oYczG6QHKFtQ4wd/WkEjzeJXs+YqilohG3AE7fWOiAVkNYRwku CkqvmmVLr/B2fbeLuXpOc1xeDI6h83Guf3zXxDcqt35rlTEiTY7x00WRyHQ6A4ex3WJ8 xJyaFqHEXqG2kj8ob2tpu2cDc06ql/lDb9fiByqeqi6G7rWaFqIOev6Vcrznw8Hed0IH sS3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y9Kg65GJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7si12590430plo.12.2019.01.21.06.01.13; Mon, 21 Jan 2019 06:01:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=y9Kg65GJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732023AbfAUN6e (ORCPT + 99 others); Mon, 21 Jan 2019 08:58:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:44060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731822AbfAUN6c (ORCPT ); Mon, 21 Jan 2019 08:58:32 -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 D69F82084C; Mon, 21 Jan 2019 13:58:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548079112; bh=5l1D5xLFLBvso1o2iWeKQZozz0ozdxdXxxTpQo7nlz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y9Kg65GJuljtE/lFSdzvDpaYTP2v2Lr3XEIxR1WqAhT3Qo84gLZiQk4+pTgIPkv48 WzCwL/ddqRpC42hZbR8C1DYZevIiqlYcAK3Sz77DYz5nTl7MI5LZMhV+b1hXQscDGq chTRIfx8NHZoCYibCMQ4x7B8MlkNjf9gjluZroAs= 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.19 13/99] netfilter: nf_conncount: fix argument order to find_next_bit Date: Mon, 21 Jan 2019 14:48:05 +0100 Message-Id: <20190121134914.421023706@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121134913.924726465@linuxfoundation.org> References: <20190121134913.924726465@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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-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;