Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/acpi Add an additional assertion for the contro...
details: https://anonhg.NetBSD.org/src/rev/4abc8ada809f
branches: trunk
changeset: 760193:4abc8ada809f
user: jruoho <jruoho%NetBSD.org@localhost>
date: Thu Dec 30 17:06:17 2010 +0000
description:
Add an additional assertion for the control MSR address.
diffstat:
sys/arch/x86/acpi/acpi_cpu_md.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 1731787cde00 -r 4abc8ada809f sys/arch/x86/acpi/acpi_cpu_md.c
--- a/sys/arch/x86/acpi/acpi_cpu_md.c Thu Dec 30 16:58:07 2010 +0000
+++ b/sys/arch/x86/acpi/acpi_cpu_md.c Thu Dec 30 17:06:17 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_md.c,v 1.36 2010/11/30 18:44:07 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_md.c,v 1.37 2010/12/30 17:06:17 jruoho Exp $ */
/*-
* Copyright (c) 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.36 2010/11/30 18:44:07 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_cpu_md.c,v 1.37 2010/12/30 17:06:17 jruoho Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -588,6 +588,9 @@
uint64_t xc;
int rv = 0;
+ if (__predict_false(ps->ps_control_addr == 0))
+ return EINVAL;
+
if ((ps->ps_flags & ACPICPU_FLAG_P_FIDVID) != 0)
return acpicpu_md_pstate_fidvid_set(ps);
Home |
Main Index |
Thread Index |
Old Index