Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2461067imd; Fri, 2 Nov 2018 11:48:29 -0700 (PDT) X-Google-Smtp-Source: AJdET5clEkTw4mpPjibcPNDWthlJgZgwUkfQ1PFTY+QtTxCVc34XNVYFSS75UOKzyWNjbpECVlEO X-Received: by 2002:a17:902:20c5:: with SMTP id v5-v6mr12871920plg.156.1541184509136; Fri, 02 Nov 2018 11:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184509; cv=none; d=google.com; s=arc-20160816; b=w/KuViiXQZ9SYZBq063YGDFQ1Bl+0Gevx4vI9GoHpZ5LjJHmBBQdIA2gr55Pxf1Ofz pGd9Ym7SU7BnvsZ1SLFy/Ieti2YJxvnnkkJPgjoAZ1gdBxbmcHYaiNeplKrj7TvddEca lopy/fEkdxFcTLGKt2SuGaJGMqfVMp+i2m6xV5bKrb+cZCH4FC+omKKAE9jIYXDoFGLD u/6cuyokea5K19CeQV8Nby3n+tKxp8echuW0H12IenHNJbIaoHBUXL9QucW2bovTTZe5 fXwgoEBmiqLPDPC0fmQnIN8lLQHy7F8hYkqN2KEjWFbPoTeripjdYquAGavWutZr/PNM gtag== 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=rnauXF3u+e6bBQGTdf7HA8RajHltejm8aZ7luuCvdeA=; b=Oze0gLdIhkzmAD3SvDZVNI2tTqwcAmtfV7mt84Z56Y4IVamXgnA89AljLdEe6yl94q nsd8O8kWbQbQRdGGKTvt80RrAQbdIilADR8CduchSNHzqkD/vgLdQyxQmQMhW+X2cx5O QnNx4L2ZUkYJzjcnzlH5TKeF7faqi9Ela5hKNup69rxZNEvEjVqMhjDkSYmQ6SA7qqDM 2UA3XC3NmO+2ObeNEgnlAiLrDKO9W9eDaxBvjHKQYh8mXLtNkAFP1mc4OLqMRD4k4aJv UgKQ6tZ2jQehAcxvWjcA0K/HbTT3RIf3KziP2dir8+3101NvDgzW0ISZsNp54x8M0S0R J8pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eF8QYGyx; 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 w22-v6si32656282plp.110.2018.11.02.11.48.14; Fri, 02 Nov 2018 11:48:29 -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=eF8QYGyx; 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 S1729000AbeKCDzb (ORCPT + 99 others); Fri, 2 Nov 2018 23:55:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:51124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727629AbeKCDzb (ORCPT ); Fri, 2 Nov 2018 23:55:31 -0400 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 6050B20837; Fri, 2 Nov 2018 18:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184438; bh=5JiKkvDKLZhSDMXqlG4FR+hbjEKlurwoeqdOEvb4pnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eF8QYGyxlfP+HWFW3K5X9FJp5jdkSk1BSPO+3gv+Q0nfm6o5c279UVZ5yv7V5Md7L fZLgFWMIGK3z9yPm1qRZ0rQV/wev4x5NJP3noYf4p5iRz3bq7gBscYWR/DZRS6CsQl kukHzYRrgfxKwiZSeFdnU13JaJr92v7k2AdP5hK8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Nikolay Aleksandrov , "David S. Miller" Subject: [PATCH 4.18 126/150] net: ipmr: fix unresolved entry dumps Date: Fri, 2 Nov 2018 19:34:48 +0100 Message-Id: <20181102182911.647092459@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nikolay Aleksandrov [ Upstream commit eddf016b910486d2123675a6b5fd7d64f77cdca8 ] If the skb space ends in an unresolved entry while dumping we'll miss some unresolved entries. The reason is due to zeroing the entry counter between dumping resolved and unresolved mfc entries. We should just keep counting until the whole table is dumped and zero when we move to the next as we have a separate table counter. Reported-by: Colin Ian King Fixes: 8fb472c09b9d ("ipmr: improve hash scalability") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/ipmr_base.c | 2 -- 1 file changed, 2 deletions(-) --- a/net/ipv4/ipmr_base.c +++ b/net/ipv4/ipmr_base.c @@ -295,8 +295,6 @@ int mr_rtm_dumproute(struct sk_buff *skb next_entry: e++; } - e = 0; - s_e = 0; spin_lock_bh(lock); list_for_each_entry(mfc, &mrt->mfc_unres_queue, list) {