Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937433AbdCJN3F (ORCPT ); Fri, 10 Mar 2017 08:29:05 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:43761 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934594AbdCJLwf (ORCPT ); Fri, 10 Mar 2017 06:52:35 -0500 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Tom Goff" , "David S. Miller" Date: Fri, 10 Mar 2017 11:46:23 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 321/370] ipmr/ip6mr: Initialize the last assert time of mfc entries. In-Reply-To: X-SA-Exim-Connect-IP: 82.70.136.246 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1218 Lines: 43 3.16.42-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tom Goff [ Upstream commit 70a0dec45174c976c64b4c8c1d0898581f759948 ] This fixes wrong-interface signaling on 32-bit platforms for entries created when jiffies > 2^31 + MFC_ASSERT_THRESH. Signed-off-by: Tom Goff Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/ipv4/ipmr.c | 4 +++- net/ipv6/ip6mr.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -883,8 +883,10 @@ static struct mfc_cache *ipmr_cache_allo { struct mfc_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL); - if (c) + if (c) { + c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1; c->mfc_un.res.minvif = MAXVIFS; + } return c; } --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -1076,6 +1076,7 @@ static struct mfc6_cache *ip6mr_cache_al struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL); if (c == NULL) return NULL; + c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1; c->mfc_un.res.minvif = MAXMIFS; return c; }