]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net/ipv6: Put lwtstate when destroying fib6_info
authorDavid Ahern <dsahern@gmail.com>
Mon, 20 Aug 2018 20:02:41 +0000 (13:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Aug 2018 01:18:40 +0000 (18:18 -0700)
Prior to the introduction of fib6_info lwtstate was managed by the dst
code. With fib6_info releasing lwtstate needs to be done when the struct
is freed.

Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_fib.c

index d212738e9d100d4e3270f9188466da6b8a3d186c..c861a6d4671d3f0f82f68752d16a8192ac649f8a 100644 (file)
@@ -198,6 +198,8 @@ void fib6_info_destroy_rcu(struct rcu_head *head)
                }
        }
 
+       lwtstate_put(f6i->fib6_nh.nh_lwtstate);
+
        if (f6i->fib6_nh.nh_dev)
                dev_put(f6i->fib6_nh.nh_dev);