Konrad Rzeszutek Wilk
c9d76a24a2
xen/time: Don't leak interrupt name when offlining.
...
When the user does:
echo 0 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu1/online
kmemleak reports:
kmemleak: 7 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
One of the leaks is from xen/time:
unreferenced object 0xffff88003fa51280 (size 32):
comm "swapper/0", pid 1, jiffies 4294667339 (age 1027.789s)
hex dump (first 32 bytes):
74 69 6d 65 72 31 00 00 00 00 00 00 00 00 00 00 timer1..........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81660721>] kmemleak_alloc+0x21/0x50
[<ffffffff81190aac>] __kmalloc_track_caller+0xec/0x2a0
[<ffffffff812fe1bb>] kvasprintf+0x5b/0x90
[<ffffffff812fe228>] kasprintf+0x38/0x40
[<ffffffff81041ec1>] xen_setup_timer+0x51/0xf0
[<ffffffff8166339f>] xen_cpu_up+0x5f/0x3e8
[<ffffffff8166bbf5>] _cpu_up+0xd1/0x14b
[<ffffffff8166bd48>] cpu_up+0xd9/0xec
[<ffffffff81ae6e4a>] smp_init+0x4b/0xa3
[<ffffffff81ac4981>] kernel_init_freeable+0xdb/0x1e6
[<ffffffff8165ce39>] kernel_init+0x9/0xf0
[<ffffffff8167edfc>] ret_from_fork+0x7c/0xb0
[<ffffffffffffffff>] 0xffffffffffffffff
This patch fixes it by stashing away the 'name' in the per-cpu
data structure and freeing it when offlining the CPU.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2013-06-10 08:43:35 -04:00
..
2013-05-09 09:59:16 -07:00
2013-05-10 07:24:14 -07:00
2013-05-09 13:25:23 -07:00
2013-05-10 09:21:05 -07:00
2013-05-09 09:59:16 -07:00
2013-05-10 07:21:16 -07:00
2013-04-30 17:04:02 -07:00
2013-05-09 10:15:46 -07:00
2013-05-01 14:08:52 -07:00
2013-05-05 10:58:06 -07:00
2013-05-09 09:59:16 -07:00
2013-05-09 09:59:16 -07:00
2013-05-01 14:08:52 -07:00
2013-05-10 09:09:47 -07:00
2013-05-09 09:59:16 -07:00
2013-05-10 07:19:52 -07:00
2013-05-10 09:21:05 -07:00
2013-05-01 14:08:52 -07:00
2013-05-09 09:59:16 -07:00
2013-05-10 09:21:05 -07:00
2013-05-11 14:29:11 -07:00
2013-05-10 09:21:05 -07:00
2013-05-01 17:51:54 -07:00
2013-05-09 09:59:16 -07:00
2013-05-10 09:21:05 -07:00
2013-05-09 14:34:58 -07:00
2013-05-07 15:14:53 -07:00
2013-05-10 09:21:05 -07:00
2013-06-10 08:43:35 -04:00
2013-05-09 14:38:16 -07:00
2013-05-05 10:58:06 -07:00