Yongqiang Liu
8fb4c98f20
cpufreq: Init completion before kobject_init_and_add()
...
commit 5c51054896 upstream.
In cpufreq_policy_alloc(), it will call uninitialed completion in
cpufreq_sysfs_release() when kobject_init_and_add() fails. And
that will cause a crash such as the following page fault in complete:
BUG: unable to handle page fault for address: fffffffffffffff8
[..]
RIP: 0010:complete+0x98/0x1f0
[..]
Call Trace:
kobject_put+0x1be/0x4c0
cpufreq_online.cold+0xee/0x1fd
cpufreq_add_dev+0x183/0x1e0
subsys_interface_register+0x3f5/0x4e0
cpufreq_register_driver+0x3b7/0x670
acpi_cpufreq_init+0x56c/0x1000 [acpi_cpufreq]
do_one_initcall+0x13d/0x780
do_init_module+0x1c3/0x630
load_module+0x6e67/0x73b0
__do_sys_finit_module+0x181/0x240
do_syscall_64+0x35/0x80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Fixes: 4ebe36c94a ("cpufreq: Fix kobject memleak")
Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com >
Acked-by: Viresh Kumar <viresh.kumar@linaro.org >
Cc: 5.2+ <stable@vger.kernel.org > # 5.2+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-12 11:58:51 +01:00
..
2022-11-26 09:24:44 +01:00
2023-01-12 11:58:42 +01:00
2021-11-06 14:13:31 +01:00
2022-12-02 17:41:00 +01:00
2023-01-12 11:58:43 +01:00
2022-08-25 11:40:15 +02:00
2022-03-08 19:12:47 +01:00
2022-12-31 13:14:27 +01:00
2022-12-31 13:14:47 +01:00
2022-12-31 13:14:20 +01:00
2022-12-02 17:41:08 +01:00
2023-01-12 11:58:48 +01:00
2022-12-31 13:14:43 +01:00
2022-12-31 13:14:04 +01:00
2022-06-22 14:22:03 +02:00
2022-12-31 13:14:30 +01:00
2023-01-12 11:58:51 +01:00
2022-12-31 13:14:01 +01:00
2022-12-31 13:14:43 +01:00
2022-07-12 16:34:58 +02:00
2022-09-28 11:11:57 +02:00
2023-01-12 11:58:51 +01:00
2022-12-31 13:14:27 +01:00
2022-11-16 09:58:30 +01:00
2022-12-02 17:41:06 +01:00
2022-12-31 13:14:03 +01:00
2022-12-31 13:14:48 +01:00
2022-05-12 12:30:05 +02:00
2022-12-31 13:14:29 +01:00
2022-10-26 12:35:07 +02:00
2022-10-26 12:35:17 +02:00
2022-12-31 13:14:31 +01:00
2022-12-31 13:14:45 +01:00
2022-04-08 14:22:50 +02:00
2023-01-12 11:58:46 +01:00
2022-12-31 13:14:32 +01:00
2022-12-31 13:14:39 +01:00
2022-12-31 13:14:44 +01:00
2022-11-16 09:58:13 +01:00
2022-12-31 13:14:30 +01:00
2022-12-31 13:14:31 +01:00
2022-03-08 19:12:37 +01:00
2022-07-23 12:54:04 +02:00
2022-12-31 13:14:47 +01:00
2022-12-31 13:14:33 +01:00
2022-12-31 13:14:14 +01:00
2022-08-17 14:23:53 +02:00
2022-12-31 13:14:35 +01:00
2022-12-31 13:14:03 +01:00
2022-12-31 13:14:37 +01:00
2022-10-26 12:34:39 +02:00
2022-12-31 13:14:35 +01:00
2022-12-31 13:14:39 +01:00
2022-12-31 13:14:30 +01:00
2023-01-12 11:58:47 +01:00
2023-01-12 11:58:49 +01:00
2022-10-26 12:34:58 +02:00
2022-12-31 13:14:17 +01:00
2023-01-12 11:58:47 +01:00
2022-12-31 13:14:35 +01:00
2023-01-12 11:58:50 +01:00
2021-11-18 19:16:08 +01:00
2022-12-31 13:14:12 +01:00
2022-12-31 13:14:47 +01:00
2022-12-31 13:14:37 +01:00
2022-08-25 11:40:14 +02:00
2022-07-07 17:53:24 +02:00
2023-01-12 11:58:43 +01:00
2022-12-08 11:28:39 +01:00
2022-12-31 13:14:19 +01:00
2022-08-17 14:24:01 +02:00
2022-11-10 18:15:40 +01:00
2022-11-26 09:24:36 +01:00
2022-12-31 13:14:24 +01:00
2022-06-14 18:36:02 +02:00
2022-12-31 13:13:58 +01:00
2022-12-31 13:14:33 +01:00
2022-12-31 13:14:12 +01:00
2022-12-31 13:14:05 +01:00
2022-12-31 13:14:02 +01:00
2022-12-31 13:14:33 +01:00
2022-10-26 12:35:30 +02:00
2022-04-08 14:23:44 +02:00
2022-04-13 20:59:01 +02:00
2022-12-31 13:14:48 +01:00
2022-12-31 13:14:05 +01:00
2022-12-31 13:14:47 +01:00
2022-12-31 13:14:36 +01:00
2022-10-05 10:39:40 +02:00
2022-10-12 09:53:28 +02:00
2022-12-31 13:14:38 +01:00
2022-12-31 13:14:41 +01:00
2022-12-31 13:14:47 +01:00
2021-11-25 09:48:31 +01:00
2022-11-26 09:24:36 +01:00
2022-11-26 09:24:44 +01:00
2023-01-12 11:58:50 +01:00
2023-01-12 11:58:49 +01:00
2022-12-31 13:14:18 +01:00
2022-10-26 12:35:19 +02:00
2022-12-31 13:14:30 +01:00
2022-11-26 09:24:49 +01:00
2022-12-02 17:41:03 +01:00
2022-12-31 13:14:31 +01:00
2022-11-16 09:58:13 +01:00
2022-12-31 13:14:28 +01:00
2022-12-31 13:14:27 +01:00
2023-01-12 11:58:41 +01:00
2022-10-05 10:39:43 +02:00
2022-12-31 13:14:27 +01:00
2022-10-26 12:34:47 +02:00
2022-12-31 13:14:47 +01:00
2022-08-25 11:40:33 +02:00
2022-07-21 21:24:33 +02:00
2022-12-31 13:14:30 +01:00
2022-04-13 20:59:11 +02:00
2022-08-17 14:24:11 +02:00
2022-12-31 13:14:04 +01:00
2021-12-22 09:32:39 +01:00