Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2670076ybl; Thu, 29 Aug 2019 11:14:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3lkrd9qEIRAHc79eQ7wq8InRiLFRAYh6NrhkgXovGod1aWoL17zUGqSIzWe7erzae/9Ci X-Received: by 2002:a65:6406:: with SMTP id a6mr9300906pgv.393.1567102460859; Thu, 29 Aug 2019 11:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567102460; cv=none; d=google.com; s=arc-20160816; b=Z8ij0wp4oz1KuhobTtC0zzlUoWDhaT6u9HeKoPozyxGqRr+KBPNBzYIfbmmB2m5T/L PuUHS+U7yLTMDOZIQP5U7Schg0qdQplIfyj1kEZpg9cQjFSFzMz9KvKIQN4ICe7JM5US oJ3rSiosQ7o+FDyT9ruIu0sWNXLYhvpCN4gxcjzD73EbETweO4BmFX3kMziIhnfypOFU XrtgT5sOc8PEvtnNruAt10W+pKhGjbmDsJkgNgT+WHFttL0MEJOZGsW8FHqIwH5e8So8 QNOFrEx/HK/P49FuQqrBVWJubMbkI5g3V7xxAC1nZ+MaNkgp/z2vVdHYpm6f/mYcJJ28 byJg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=UPDLlow8gbEzrm6zKTa0mWYoMTUzQOhXonCAH8UDcLk=; b=dKibOOetVB1hj0SMhp03z7VtXTE/7SMa9gdoQHqceTE2mRK6cBJnvixBtsrAKyv53O +QJ7IQGVZXriHYjPcyesDDJTS/yxo7DLfzK5m5N6fwS3XQbtReCmyGoBBV+iL8d60JsT e0K3x/KC7T8x4xHbu3Wcfhynytg3U9g1Tkmj0xhx0oo9iQYOotwg8TpcegWq8mp5bwCf OxC+fpNw3BfuoppGligzycSyFI2v8buEERMgDAc48KCIioTgJHh6jxiYltGYqwRKdqFp jbjFFM2xI9mVjMd/+Pzgo33iDhuIJHseiCD/F8M13xOydNoP4KHndGNlvUO74KQJdBNl yzHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VqD7Uf5B; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si3474703pfi.140.2019.08.29.11.14.05; Thu, 29 Aug 2019 11:14:20 -0700 (PDT) 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=VqD7Uf5B; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728017AbfH2SNO (ORCPT + 99 others); Thu, 29 Aug 2019 14:13:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:55002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbfH2SNO (ORCPT ); Thu, 29 Aug 2019 14:13:14 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 307E521874; Thu, 29 Aug 2019 18:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567102393; bh=eF5DfDYj7vzJJwsDctZbpjiYwWB/aovBZTyRp1T5PMk=; h=From:To:Cc:Subject:Date:From; b=VqD7Uf5BeVR8hNnKS695qezuXsuaSrUwMnGxFsCigvfuoI87La7FAStI9fabVdBSH Abeqlci+iYFB1ZHBJsHvccFSxs3p4up/AUw6eYL5fACmNPINSn3HZlX3SzBSV1STLe UPKWJq/LNgtZQO/tD8N0Kuc8axs+d/iXW88Ro7vQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sven Eckelmann , Simon Wunderlich , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.2 01/76] batman-adv: Fix netlink dumping of all mcast_flags buckets Date: Thu, 29 Aug 2019 14:11:56 -0400 Message-Id: <20190829181311.7562-1-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Eckelmann [ Upstream commit fa3a03da549a889fc9dbc0d3c5908eb7882cac8f ] The bucket variable is only updated outside the loop over the mcast_flags buckets. It will only be updated during a dumping run when the dumping has to be interrupted and a new message has to be started. This could result in repeated or missing entries when the multicast flags are dumped to userspace. Fixes: d2d489b7d851 ("batman-adv: Add inconsistent multicast netlink dump detection") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich Signed-off-by: Sasha Levin --- net/batman-adv/multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c index ec54e236e3454..50fe9dfb088b6 100644 --- a/net/batman-adv/multicast.c +++ b/net/batman-adv/multicast.c @@ -1653,7 +1653,7 @@ __batadv_mcast_flags_dump(struct sk_buff *msg, u32 portid, while (bucket_tmp < hash->size) { if (batadv_mcast_flags_dump_bucket(msg, portid, cb, hash, - *bucket, &idx_tmp)) + bucket_tmp, &idx_tmp)) break; bucket_tmp++; -- 2.20.1