summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/xen/hypercall.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/xen/hypercall.h')
-rw-r--r--arch/x86/include/asm/xen/hypercall.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
index ccdc23d89b60..9f694537a103 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -216,6 +216,9 @@ privcmd_call(unsigned call,
__HYPERCALL_DECLS;
__HYPERCALL_5ARG(a1, a2, a3, a4, a5);
+ if (call >= PAGE_SIZE / sizeof(hypercall_page[0]))
+ return -EINVAL;
+
stac();
asm volatile(CALL_NOSPEC
: __HYPERCALL_5PARAM