nfp: flower: free dst_entry in route table
authorPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Tue, 12 Jun 2018 04:33:38 +0000 (21:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Jun 2018 22:18:28 +0000 (15:18 -0700)
We need to release the refcnt on dst_entry in the route table, otherwise
we will leak the route.

Fixes: 8e6a9046b66a ("nfp: flower vxlan neighbour offload")
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Signed-off-by: Louis Peens <louis.peens@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c

index ec524d97869d6fdf12160eda47aa4043aa4fedeb..78afe75129ab5b7a852d5bffa40f5daa9b1c76d1 100644 (file)
@@ -381,6 +381,8 @@ nfp_tun_neigh_event_handler(struct notifier_block *nb, unsigned long event,
        err = PTR_ERR_OR_ZERO(rt);
        if (err)
                return NOTIFY_DONE;
+
+       ip_rt_put(rt);
 #else
        return NOTIFY_DONE;
 #endif