summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-02-09 08:15:20 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-02-09 08:15:20 +0000
commitbb3b197688f523b9c07622e0eb0bab810710b698 (patch)
tree772b9882e120ab377b195a8576ec87cfa7452db9
parent4e47558cfc785e74dce19f82896a004b73750464 (diff)
More sanity checking for Local APIC NMI entries.
ok deraadt@
-rw-r--r--sys/dev/acpi/acpimadt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpimadt.c b/sys/dev/acpi/acpimadt.c
index 1c8a9e49c3f..5b65ec575f8 100644
--- a/sys/dev/acpi/acpimadt.c
+++ b/sys/dev/acpi/acpimadt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpimadt.c,v 1.30 2014/12/09 06:58:29 doug Exp $ */
+/* $OpenBSD: acpimadt.c,v 1.31 2015/02/09 08:15:19 kettenis Exp $ */
/*
* Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org>
*
@@ -359,7 +359,8 @@ acpimadt_attach(struct device *parent, struct device *self, void *aux)
map->ioapic_pin = pin;
map->flags = entry->madt_lapic_nmi.flags;
- if (!acpimadt_cfg_intr(entry->madt_lapic_nmi.flags, &map->redir)) {
+ if ((pin != 0 && pin != 1) ||
+ !acpimadt_cfg_intr(entry->madt_lapic_nmi.flags, &map->redir)) {
printf("%s: bogus nmi for apid %d\n",
self->dv_xname, map->cpu_id);
mp_nintrs--;