linux/net/netfilter/ipvs
Tommi Rantala 28c272a340 ipvs: fix memory leak in ip_vs_ctl.c
commit f30bf2a5ca upstream.

Fix memory leak introduced in commit a0840e2e16 ("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: a0840e2e16 ("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>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
History 2015-06-02 12:18:21 +01:00
..
ip_vs_app.c ipvs: do not disable bh for long time 2013-04-02 00:23:58 +02:00
ip_vs_conn.c ipvs: avoid netns exit crash on ip_vs_conn_drop_conntrack 2014-07-16 09:39:28 +09:00
ip_vs_core.c ipvs: rerouting to local clients is not needed anymore 2015-03-12 15:32:48 +00:00
ip_vs_ctl.c ipvs: fix memory leak in ip_vs_ctl.c 2015-06-02 12:18:21 +01:00
ip_vs_dh.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_est.c ipvs: stats should not depend on CPU 0 2013-09-18 14:40:20 -05:00
ip_vs_ftp.c ipvs: uninitialized data with IP_VS_IPV6 2015-02-02 10:01:01 +00:00
ip_vs_lblc.c ipvs: Reduce checkpatch noise in ip_vs_lblc.c 2014-03-07 12:36:21 +09:00
ip_vs_lblcr.c ipvs: avoid rcu_barrier during netns cleanup 2013-10-15 10:36:01 +09:00
ip_vs_lc.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_nfct.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-06 17:37:45 -05:00
ip_vs_nq.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_pe.c ipvs: convert services to rcu 2013-04-02 00:23:58 +02:00
ip_vs_pe_sip.c netfilter: push reasm skb through instead of original frag skbs 2013-11-11 00:19:35 -05:00
ip_vs_proto.c ipvs: Trivial changes, use compressed IPv6 address in output 2012-09-28 11:33:52 +09:00
ip_vs_proto_ah_esp.c ipvs: API change to avoid rescan of IPv6 exthdr 2012-09-28 11:34:33 +09:00
ip_vs_proto_sctp.c net: ipvs: sctp: do not recalc sctp csum when ports didn't change 2013-10-30 09:48:16 +09:00
ip_vs_proto_tcp.c ipvs: sloppy TCP and SCTP 2013-06-26 18:01:46 +09:00
ip_vs_proto_udp.c ipvs: convert services to rcu 2013-04-02 00:23:58 +02:00
ip_vs_rr.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_sched.c ipvs: convert services to rcu 2013-04-02 00:23:58 +02:00
ip_vs_sed.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_sh.c ipvs: improved SH fallback strategy 2013-10-15 10:54:50 +09:00
ip_vs_sync.c ipvs: add missing ip_vs_pe_put in sync code 2015-03-12 15:36:49 +00:00
ip_vs_wlc.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_wrr.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_xmit.c ipvs: Maintain all DSCP and ECN bits for ipv6 tun forwarding 2014-10-05 13:41:11 -07:00
Kconfig ipvs: Complete IPv6 fragment handling for IPVS 2012-09-28 11:34:24 +09:00
Makefile IPVS: sip persistence engine 2010-10-04 22:45:24 +09:00