]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ipmr/ip6mr: Initialize the last assert time of mfc entries.
authorTom Goff <thomas.goff@ll.mit.edu>
Thu, 23 Jun 2016 20:11:57 +0000 (16:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jul 2016 16:30:00 +0000 (09:30 -0700)
[ 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 <thomas.goff@ll.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ipmr.c
net/ipv6/ip6mr.c

index 395e2814a46d9995b63b6bc703e28433ecc26c2b..a42dd8021b6bc83fed0d208f22da0ced123fa854 100644 (file)
@@ -891,8 +891,10 @@ static struct mfc_cache *ipmr_cache_alloc(void)
 {
        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;
 }
 
index a10e77103c88dfc952f80c645a7b87c57b8f6dbf..e207cb2468dab0799422b2fc4620d729ed09a44b 100644 (file)
@@ -1074,6 +1074,7 @@ static struct mfc6_cache *ip6mr_cache_alloc(void)
        struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
        if (!c)
                return NULL;
+       c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1;
        c->mfc_un.res.minvif = MAXMIFS;
        return c;
 }