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-unstable] powernow: implement struct cpufreq_driver

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] powernow: implement struct cpufreq_driver.verify
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 06 Dec 2008 04:20:45 -0800
Delivery-date: Sat, 06 Dec 2008 04:23:38 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1228490541 0
# Node ID 3db54d2aa8bd7ec8c096fb4fafa068850ff0ff35
# Parent  e34f3e314ecf3c28a295351ade9e02596c0dad81
powernow: implement struct cpufreq_driver.verify

Without this, under rare conditions hypervisor crashes are possible
due to this method being called without checking against NULL.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/acpi/cpufreq/powernow.c |   11 +++++++++++
 1 files changed, 11 insertions(+)

diff -r e34f3e314ecf -r 3db54d2aa8bd xen/arch/x86/acpi/cpufreq/powernow.c
--- a/xen/arch/x86/acpi/cpufreq/powernow.c      Fri Dec 05 15:21:59 2008 +0000
+++ b/xen/arch/x86/acpi/cpufreq/powernow.c      Fri Dec 05 15:22:21 2008 +0000
@@ -129,6 +129,16 @@ static int powernow_cpufreq_target(struc
     return result;
 }
 
+static int powernow_cpufreq_verify(struct cpufreq_policy *policy)
+{
+    struct powernow_cpufreq_data *data;
+
+    if (!policy || !(data = drv_data[policy->cpu]))
+        return -EINVAL;
+
+    return cpufreq_frequency_table_verify(policy, data->freq_table);
+}
+
 static int powernow_cpufreq_cpu_init(struct cpufreq_policy *policy)
 {
     unsigned int i;
@@ -243,6 +253,7 @@ static int powernow_cpufreq_cpu_exit(str
 }
 
 static struct cpufreq_driver powernow_cpufreq_driver = {
+    .verify = powernow_cpufreq_verify,
     .target = powernow_cpufreq_target,
     .init   = powernow_cpufreq_cpu_init,
     .exit   = powernow_cpufreq_cpu_exit

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] powernow: implement struct cpufreq_driver.verify, Xen patchbot-unstable <=