Xiaotian Feng
cad70a6ae5
[CPUFREQ] fix memory leak in cpufreq_add_dev
We didn't free policy->related_cpus in error path err_unlock_policy.
This is catched by following kmemleak report:
unreferenced object 0xffff88022a0b96d0 (size 512):
comm "modprobe", pid 886, jiffies 4294689177 (age 780.694s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8111ebe5>] create_object+0x186/0x281
[<ffffffff814fad4f>] kmemleak_alloc+0x60/0xa7
[<ffffffff8111127a>] kmem_cache_alloc_node_notrace+0x120/0x142
[<ffffffff81262e4f>] alloc_cpumask_var_node+0x2c/0xd7
[<ffffffff81262f0b>] alloc_cpumask_var+0x11/0x13
[<ffffffff81262f1c>] zalloc_cpumask_var+0xf/0x11
[<ffffffff8140fac0>] cpufreq_add_dev+0x11f/0x547
[<ffffffff81334bda>] sysdev_driver_register+0xc2/0x11d
[<ffffffff8140e334>] cpufreq_register_driver+0xcb/0x1b8
[<ffffffffa032e040>] 0xffffffffa032e040
[<ffffffff810021ba>] do_one_initcall+0x5e/0x15c
[<ffffffff81087f94>] sys_init_module+0xa6/0x1e6
[<ffffffff81009bc2>] system_call_fastpath+0x16/0x1b
[<ffffffffffffffff>] 0xffffffffffffffff
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2010-08-03 13:47:02 -04:00
..
2010-07-24 23:26:22 -04:00
2010-07-01 15:34:48 -04:00
2010-05-22 00:36:56 -06:00
2010-05-25 08:07:09 -07:00
2010-07-26 08:05:31 -07:00
2010-06-15 08:12:34 +02:00
2010-07-01 21:28:14 -07:00
2010-07-21 19:27:07 -05:00
2010-07-20 16:25:41 -07:00
2010-08-03 13:47:02 -04:00
2010-07-01 09:39:48 +02:00
2010-07-19 14:11:24 +08:00
2010-07-02 15:46:17 -06:00
2010-07-20 16:25:40 -07:00
2010-06-02 19:48:13 +02:00
2010-05-21 09:37:31 -07:00
2010-07-20 16:25:41 -07:00
2010-07-22 11:45:57 -07:00
2010-07-11 23:13:15 +02:00
2010-07-09 16:22:51 +02:00
2010-07-11 13:35:34 -07:00
2010-06-02 17:50:38 +10:00
2010-05-28 14:26:20 -04:00
2010-05-27 10:22:06 -07:00
2010-07-08 13:27:05 -07:00
2010-07-22 11:46:15 -07:00
2010-06-26 22:12:02 -07:00
2010-06-03 11:33:58 +02:00
2010-06-03 15:46:37 -07:00
2010-06-24 13:36:04 +10:00
2010-07-08 16:50:24 -03:00
2010-05-27 09:12:41 -07:00
2010-06-03 11:33:58 +02:00
2010-07-20 16:25:41 -07:00
2010-07-20 16:25:41 -07:00
2010-06-07 17:10:06 -07:00
2010-07-20 16:26:42 -07:00
2010-05-22 00:36:56 -06:00
2010-05-26 19:51:09 +02:00
2010-07-16 11:39:48 -07:00
2010-07-21 13:52:36 +02:00
2010-07-19 13:17:37 -07:00
2010-07-20 08:22:15 -07:00
2010-05-30 09:02:47 -07:00
2010-06-03 11:33:58 +02:00
2010-06-29 15:29:31 -07:00
2010-07-19 09:22:50 +02:00
2010-07-12 21:16:04 -07:00
2010-06-03 15:48:15 -07:00
2010-07-21 09:28:50 -07:00
2010-06-01 12:04:35 -04:00
2010-06-02 18:10:00 +09:00
2010-07-11 11:03:22 -05:00
2010-05-28 13:57:01 -04:00
2010-06-30 15:45:59 -07:00
2010-05-27 09:12:42 -07:00
2010-07-21 09:25:42 -07:00
2010-07-20 16:26:42 -07:00
2010-07-21 09:25:42 -07:00
2010-07-26 08:05:31 -07:00
2010-05-21 09:37:31 -07:00
2010-06-17 09:56:57 +00:00
2010-06-03 09:34:45 +01:00
2010-05-21 09:37:31 -07:00
2010-05-28 14:26:20 -04:00