WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.1-testing] xen: avoid crash enabling turbo mode

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] xen: avoid crash enabling turbo mode
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Fri, 18 Nov 2011 02:55:09 +0000
Delivery-date: Thu, 17 Nov 2011 18:55:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=