[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1539000363-25333-1-git-send-email-rppt@linux.vnet.ibm.com>
Date: Mon, 8 Oct 2018 15:06:03 +0300
From: Mike Rapoport <rppt@...ux.vnet.ibm.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: David Ahern <dsahern@...il.com>, netdev@...r.kernel.org,
Mike Rapoport <rppt@...ux.vnet.ibm.com>, stable@...r.kernel.org
Subject: [PATCH net-next] net/ipv6: stop leaking percpu memory in fib6 info
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@...ux.vnet.ibm.com>
Cc: stable@...r.kernel.org
---
net/ipv6/ip6_fib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index cf709eadc932..cc7de7eb8b9c 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -194,6 +194,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);
--
2.7.4
Powered by blists - more mailing lists