|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-4.1-testing] xen: avoid crash enabling turbo mode
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1321461469 0
# Node ID 4a91cf045893035f8cfd7f97ab6c134250d8411a
# Parent 98ba0aceaf302a3d89a9f4f4a165d991a96aa1a1
xen: avoid crash enabling turbo mode
On a system which has not had P-state information pushed down into the
hypervisor running "xenpm enable-turbo-mode" will reliably crash the
host.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
xen-unstable changeset: 24144:cd3ef25f207a
xen-unstable date: Tue Nov 15 14:24:38 2011 +0100
Committed-by: Keir Fraser <keir@xxxxxxx>
---
diff -r 98ba0aceaf30 -r 4a91cf045893 xen/drivers/cpufreq/utility.c
--- a/xen/drivers/cpufreq/utility.c Wed Nov 16 16:33:58 2011 +0000
+++ b/xen/drivers/cpufreq/utility.c Wed Nov 16 16:37:49 2011 +0000
@@ -400,7 +400,7 @@
struct cpufreq_policy *policy;
policy = per_cpu(cpufreq_cpu_policy, cpuid);
- if (policy->turbo != CPUFREQ_TURBO_UNSUPPORTED)
+ if (policy && policy->turbo != CPUFREQ_TURBO_UNSUPPORTED)
policy->turbo = CPUFREQ_TURBO_ENABLED;
}
@@ -409,7 +409,7 @@
struct cpufreq_policy *policy;
policy = per_cpu(cpufreq_cpu_policy, cpuid);
- if (policy->turbo != CPUFREQ_TURBO_UNSUPPORTED)
+ if (policy && policy->turbo != CPUFREQ_TURBO_UNSUPPORTED)
policy->turbo = CPUFREQ_TURBO_DISABLED;
}
@@ -418,7 +418,7 @@
struct cpufreq_policy *policy;
policy = per_cpu(cpufreq_cpu_policy, cpuid);
- return policy->turbo;
+ return policy && policy->turbo;
}
/*********************************************************************
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-4.1-testing] xen: avoid crash enabling turbo mode,
Xen patchbot-4 . 1-testing <=
|
|
|
|
|