From: David Ahern Date: Mon, 20 Aug 2018 20:02:41 +0000 (-0700) Subject: net/ipv6: Put lwtstate when destroying fib6_info X-Git-Tag: v4.19~268^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80f1a0f4e0cd4bfc8a74fc1c39843a6e7b206b95;p=platform%2Fkernel%2Flinux-rpi3.git net/ipv6: Put lwtstate when destroying fib6_info 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index d212738..c861a6d 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -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);