[Devel] [PATCH rh7 1/3] tcp: add missing tcp_orphan_count destruction

Vladimir Davydov vdavydov at parallels.com
Mon Jun 15 09:33:37 PDT 2015


  WARNING: at lib/list_debug.c:62 __list_del_entry+0x82/0xd0()
  list_del corruption. next->prev should be ffff8807698f0370, but was ffff880769876ba0
  CPU: 14 PID: 784 Comm: kworker/14:1 ve: 0 Tainted: G          I --------------   3.10.0-123.1.2.vz7.5.13 #1 5.13
  Workqueue: cgroup_destroy cgroup_free_fn
  ffffffff81803c47 000000004c5b148c ffff880769533cb8 ffffffff815c90ba
  ffff880769533cf0 ffffffff8105da61 ffff8807698f0370 ffff8807698f0000
  ffff88075bba4350 ffff88075bba4200 0000000000000380 ffff880769533d58
  Call Trace:
  [<ffffffff815c90ba>] dump_stack+0x19/0x1b
  [<ffffffff8105da61>] warn_slowpath_common+0x61/0x80
  [<ffffffff8105dadc>] warn_slowpath_fmt+0x5c/0x80
  [<ffffffff812a5018>] ? kobject_put+0x28/0x60
  [<ffffffff812bb812>] __list_del_entry+0x82/0xd0
  [<ffffffff812bb86d>] list_del+0xd/0x30
  [<ffffffff812c2d54>] percpu_counter_destroy+0x24/0x50
  [<ffffffff8154b98d>] tcp_destroy_cgroup+0x1d/0x20
  [<ffffffff814ad3b9>] mem_cgroup_sockets_destroy+0x49/0x70
  [<ffffffff811abfc5>] mem_cgroup_css_free+0x35/0x40
  [<ffffffff810e3d46>] cgroup_free_fn+0x46/0x120
  [<ffffffff8107f02b>] process_one_work+0x17b/0x460
  [<ffffffff8107fdfb>] worker_thread+0x11b/0x400
  [<ffffffff8107fce0>] ? rescuer_thread+0x400/0x400
  [<ffffffff81086ddf>] kthread+0xcf/0xe0
  [<ffffffff81086d10>] ? create_kthread+0x60/0x60
  [<ffffffff815d97ac>] ret_from_fork+0x7c/0xb0
  [<ffffffff81086d10>] ? create_kthread+0x60/0x60

https://jira.sw.ru/browse/PSBM-34215

Fixes: e695351ac3ec2 ("tcp: Limit orphan sockets per-cg")
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 net/ipv4/tcp_memcontrol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv4/tcp_memcontrol.c b/net/ipv4/tcp_memcontrol.c
index 3636f9d65743..82a312770fe1 100644
--- a/net/ipv4/tcp_memcontrol.c
+++ b/net/ipv4/tcp_memcontrol.c
@@ -136,6 +136,7 @@ void tcp_destroy_cgroup(struct mem_cgroup *memcg)
 
 	tcp = tcp_from_cgproto(cg_proto);
 	percpu_counter_destroy(&tcp->tcp_sockets_allocated);
+	percpu_counter_destroy(&tcp->tcp_orphan_count);
 }
 EXPORT_SYMBOL(tcp_destroy_cgroup);
 
-- 
2.1.4




More information about the Devel mailing list