summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-04-19 13:44:15 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-04-19 13:44:15 +0000
commit6b8c8bf0fd25360abd0c16c2ee6a5d114aa79a98 (patch)
tree9ed8bcacf22b6f768a460d3f29f088a0ce1d01a7 /sys/arch/amd64
parent6452cef06def08fe58a41b478c6e61963445df16 (diff)
Initialize vmx_get_guest_faulttype() 'prot' to 0 instead of using
random stack garbage. CID 1492655 ok pd@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/vmm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c
index 8b2bc9f0192..f308948ef4f 100644
--- a/sys/arch/amd64/amd64/vmm.c
+++ b/sys/arch/amd64/amd64/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.271 2020/04/08 07:39:48 pd Exp $ */
+/* $OpenBSD: vmm.c,v 1.272 2020/04/19 13:44:14 krw Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -5415,6 +5415,7 @@ vmx_get_guest_faulttype(void)
if (exit_qual & IA32_VMX_EPT_FAULT_WAS_EXECABLE)
was_prot |= PROT_EXEC;
+ prot = 0;
if (exit_qual & IA32_VMX_EPT_FAULT_READ)
prot = PROT_READ;
else if (exit_qual & IA32_VMX_EPT_FAULT_WRITE)