projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8343c40
)
ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid data
author
Hoan Tran
<
[email protected]
>
Wed, 25 May 2016 19:09:23 +0000
(12:09 -0700)
committer
Rafael J. Wysocki
<
[email protected]
>
Sat, 25 Jun 2016 00:53:31 +0000
(
02:53
+0200)
When CPPC fails to request a PCC channel, the CPC data is freed
and cpc_desc_ptr points to the invalid data.
Avoid this issue by moving the cpc_desc_ptr assignment after the PCC
channel request.
Signed-off-by: Hoan Tran <
[email protected]
>
Acked-by: Ashwin Chaugule <
[email protected]
>
Signed-off-by: Rafael J. Wysocki <
[email protected]
>
drivers/acpi/cppc_acpi.c
patch
|
blob
|
history
diff --git
a/drivers/acpi/cppc_acpi.c
b/drivers/acpi/cppc_acpi.c
index f9be3150017c7291a1a1f98e2b6524e1cb6fceae..2e981732805ba1f85e11528f6f8e19fa93f3414a 100644
(file)
--- a/
drivers/acpi/cppc_acpi.c
+++ b/
drivers/acpi/cppc_acpi.c
@@
-601,9
+601,6
@@
int acpi_cppc_processor_probe(struct acpi_processor *pr)
/* Store CPU Logical ID */
cpc_ptr->cpu_id = pr->id;
- /* Plug it into this CPUs CPC descriptor. */
- per_cpu(cpc_desc_ptr, pr->id) = cpc_ptr;
-
/* Parse PSD data for this CPU */
ret = acpi_get_psd(cpc_ptr, handle);
if (ret)
@@
-616,6
+613,9
@@
int acpi_cppc_processor_probe(struct acpi_processor *pr)
goto out_free;
}
+ /* Plug PSD data into this CPUs CPC descriptor. */
+ per_cpu(cpc_desc_ptr, pr->id) = cpc_ptr;
+
/* Everything looks okay */
pr_debug("Parsed CPC struct for CPU: %d\n", pr->id);