diff options
author | Mike Rapoport <rppt@linux.vnet.ibm.com> | 2018-10-09 07:02:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-18 09:18:11 +0200 |
commit | d29a558b56ee952e452969ac7c90d0a7bf2f58bb (patch) | |
tree | 00d1df42dfc9d64fed52a45dd7d0fc900ea2421b | |
parent | e3827b9bc3ba2bcfe5eef2fa2d440d7e1734f362 (diff) | |
download | linux-stable-d29a558b56ee952e452969ac7c90d0a7bf2f58bb.tar.gz linux-stable-d29a558b56ee952e452969ac7c90d0a7bf2f58bb.tar.bz2 linux-stable-d29a558b56ee952e452969ac7c90d0a7bf2f58bb.zip |
net/ipv6: stop leaking percpu memory in fib6 info
[ Upstream commit 7abab7b9b498650404800a08765f44929fee8f31 ]
The fib6_info_alloc() function allocates percpu memory to hold per CPU
pointers to rt6_info, but this memory is never freed. Fix it.
Fixes: a64efe142f5e ("net/ipv6: introduce fib6_info struct and helpers")
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/ipv6/ip6_fib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 5516f55e214b..cbe46175bb59 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -196,6 +196,8 @@ void fib6_info_destroy_rcu(struct rcu_head *head) *ppcpu_rt = NULL; } } + + free_percpu(f6i->rt6i_pcpu); } lwtstate_put(f6i->fib6_nh.nh_lwtstate); |