* [GIT PULL nf] IPVS Fixes for v4.1
@ 2015-05-08 9:10 Simon Horman
2015-05-08 9:10 ` [PATCH nf] ipvs: fix memory leak in ip_vs_ctl.c Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Simon Horman @ 2015-05-08 9:10 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, Simon Horman
Hi Pablo,
please consider this fix for v4.1.
It resolves a memory leak which appears to have been around since v3.18.
The following changes since commit 39376ccb1968ba9f83e2a880a8bf02ad5dea44e1:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf (2015-04-27 23:12:34 -0400)
are available in the git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git tags/ipvs-fixes-for-v4.1
for you to fetch changes up to f30bf2a5cac6c60ab366c4bc6db913597bf4d6ab:
ipvs: fix memory leak in ip_vs_ctl.c (2015-05-08 17:58:54 +0900)
----------------------------------------------------------------
Tommi Rantala (1):
ipvs: fix memory leak in ip_vs_ctl.c
net/netfilter/ipvs/ip_vs_ctl.c | 3 +++
1 file changed, 3 insertions(+)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH nf] ipvs: fix memory leak in ip_vs_ctl.c
2015-05-08 9:10 [GIT PULL nf] IPVS Fixes for v4.1 Simon Horman
@ 2015-05-08 9:10 ` Simon Horman
2015-05-15 13:30 ` [GIT PULL nf] IPVS Fixes for v4.1 Pablo Neira Ayuso
2015-05-16 18:54 ` Pablo Neira Ayuso
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2015-05-08 9:10 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang,
Julian Anastasov, Tommi Rantala, Simon Horman
From: Tommi Rantala <tt.rantala@gmail.com>
Fix memory leak introduced in commit a0840e2e165a ("IPVS: netns,
ip_vs_ctl local vars moved to ipvs struct."):
unreferenced object 0xffff88005785b800 (size 2048):
comm "(-localed)", pid 1434, jiffies 4294755650 (age 1421.089s)
hex dump (first 32 bytes):
bb 89 0b 83 ff ff ff ff b0 78 f0 4e 00 88 ff ff .........x.N....
04 00 00 00 a4 01 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8262ea8e>] kmemleak_alloc+0x4e/0xb0
[<ffffffff811fba74>] __kmalloc_track_caller+0x244/0x430
[<ffffffff811b88a0>] kmemdup+0x20/0x50
[<ffffffff823276b7>] ip_vs_control_net_init+0x1f7/0x510
[<ffffffff8231d630>] __ip_vs_init+0x100/0x250
[<ffffffff822363a1>] ops_init+0x41/0x190
[<ffffffff82236583>] setup_net+0x93/0x150
[<ffffffff82236cc2>] copy_net_ns+0x82/0x140
[<ffffffff810ab13d>] create_new_namespaces+0xfd/0x190
[<ffffffff810ab49a>] unshare_nsproxy_namespaces+0x5a/0xc0
[<ffffffff810833e3>] SyS_unshare+0x173/0x310
[<ffffffff8265cbd7>] system_call_fastpath+0x12/0x6f
[<ffffffffffffffff>] 0xffffffffffffffff
Fixes: a0840e2e165a ("IPVS: netns, ip_vs_ctl local vars moved to ipvs struct.")
Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
net/netfilter/ipvs/ip_vs_ctl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 49532672f66d..285eae3a1454 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -3823,6 +3823,9 @@ static void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net)
cancel_work_sync(&ipvs->defense_work.work);
unregister_net_sysctl_table(ipvs->sysctl_hdr);
ip_vs_stop_estimator(net, &ipvs->tot_stats);
+
+ if (!net_eq(net, &init_net))
+ kfree(ipvs->sysctl_tbl);
}
#else
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [GIT PULL nf] IPVS Fixes for v4.1
2015-05-08 9:10 [GIT PULL nf] IPVS Fixes for v4.1 Simon Horman
2015-05-08 9:10 ` [PATCH nf] ipvs: fix memory leak in ip_vs_ctl.c Simon Horman
@ 2015-05-15 13:30 ` Pablo Neira Ayuso
2015-05-16 18:54 ` Pablo Neira Ayuso
2 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2015-05-15 13:30 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang, Julian Anastasov
On Fri, May 08, 2015 at 06:10:26PM +0900, Simon Horman wrote:
> Hi Pablo,
>
> please consider this fix for v4.1.
Pulled, thanks Simon.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [GIT PULL nf] IPVS Fixes for v4.1
2015-05-08 9:10 [GIT PULL nf] IPVS Fixes for v4.1 Simon Horman
2015-05-08 9:10 ` [PATCH nf] ipvs: fix memory leak in ip_vs_ctl.c Simon Horman
2015-05-15 13:30 ` [GIT PULL nf] IPVS Fixes for v4.1 Pablo Neira Ayuso
@ 2015-05-16 18:54 ` Pablo Neira Ayuso
2 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2015-05-16 18:54 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, Wensong Zhang, Julian Anastasov
On Fri, May 08, 2015 at 06:10:26PM +0900, Simon Horman wrote:
> Hi Pablo,
>
> please consider this fix for v4.1.
>
> It resolves a memory leak which appears to have been around since v3.18.
BTW, I have also enqueued this to -stable >= 3.18. Feel free to send
me requests to submit stuff already in upstream for -stable anytime.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-16 18:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-08 9:10 [GIT PULL nf] IPVS Fixes for v4.1 Simon Horman
2015-05-08 9:10 ` [PATCH nf] ipvs: fix memory leak in ip_vs_ctl.c Simon Horman
2015-05-15 13:30 ` [GIT PULL nf] IPVS Fixes for v4.1 Pablo Neira Ayuso
2015-05-16 18:54 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).