]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: neigh: use long type to store jiffies delta
authorEric Dumazet <edumazet@google.com>
Tue, 5 Nov 2019 22:11:49 +0000 (14:11 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit 9d027e3a83f39b819e908e4e09084277a2e45e95 ]

A difference of two unsigned long needs long storage.

Fixes: c7fb64db001f ("[NETLINK]: Neighbour table configuration and statistics via rtnetlink")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/core/neighbour.c

index 46a5d0fecbb9ff4b9a5e621ec8d507493b647b4c..231e94163c249ed4ac4c37c9036b2efe2663877e 100644 (file)
@@ -1877,8 +1877,8 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
                goto nla_put_failure;
        {
                unsigned long now = jiffies;
-               unsigned int flush_delta = now - tbl->last_flush;
-               unsigned int rand_delta = now - tbl->last_rand;
+               long flush_delta = now - tbl->last_flush;
+               long rand_delta = now - tbl->last_rand;
                struct neigh_hash_table *nht;
                struct ndt_config ndc = {
                        .ndtc_key_len           = tbl->key_len,