Xiaotian Feng
ff8c1474cc
block: fix ioc leak in put_io_context
...
When put_io_context is called, if ioc->icq_list is empty and refcount
is 1, kernel will not free the ioc.
This is caught by following kmemleak:
unreferenced object 0xffff880036349fe0 (size 216):
comm "sh", pid 2137, jiffies 4294931140 (age 290579.412s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01 00 01 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
backtrace:
[<ffffffff8169f926>] kmemleak_alloc+0x26/0x50
[<ffffffff81195a9c>] kmem_cache_alloc_node+0x1cc/0x2a0
[<ffffffff81356b67>] create_io_context_slowpath+0x27/0x130
[<ffffffff81356d2b>] get_task_io_context+0xbb/0xf0
[<ffffffff81055f0e>] copy_process+0x188e/0x18b0
[<ffffffff8105609b>] do_fork+0x11b/0x420
[<ffffffff810247f8>] sys_clone+0x28/0x30
[<ffffffff816d3373>] stub_clone+0x13/0x20
[<ffffffffffffffff>] 0xffffffffffffffff
ioc should be freed if ioc->icq_list is empty.
Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-03-14 15:34:48 +01:00
..
2012-01-03 22:54:06 -05:00
2012-02-07 07:51:30 +01:00
2011-10-24 16:08:38 +02:00
2012-02-08 09:19:42 +01:00
2011-12-14 00:33:37 +01:00
2011-10-24 16:24:31 +02:00
2011-10-31 19:31:12 -04:00
2012-03-14 15:34:48 +01:00
2009-12-04 15:39:55 +01:00
2011-07-23 20:34:59 +02:00
2011-12-21 15:27:24 +01:00
2012-02-08 09:19:38 +01:00
2012-01-11 16:27:11 +01:00
2011-09-14 09:31:01 +02:00
2011-12-14 00:33:42 +01:00
2011-12-29 09:16:28 +01:00
2011-12-14 00:33:37 +01:00
2011-08-03 14:25:20 -10:00
2012-02-08 09:19:38 +01:00
2011-10-31 19:31:13 -04:00
2012-02-08 20:02:03 +01:00
2012-02-15 09:45:49 +01:00
2011-03-12 16:54:00 +01:00
2012-01-11 16:29:31 +01:00
2011-12-14 00:33:42 +01:00
2012-02-08 09:19:38 +01:00
2012-03-02 10:51:00 +01:00
2012-01-15 12:24:45 -08:00
2012-01-03 22:54:06 -05:00
2010-04-26 19:27:56 +02:00
2012-01-03 22:54:06 -05:00
2011-12-14 00:33:42 +01:00
2012-03-02 10:38:33 +01:00
2012-01-14 15:07:24 -08:00