summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/setup.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2015-09-04 14:50:33 +0200
committerDavid Vrabel <david.vrabel@citrix.com>2015-09-28 14:48:52 +0100
commit24f775a6605a8ffc697c0767fc7ea85656ddb958 (patch)
tree405762fa77d7b70171aaeb732f9f6cb808c6f3dd /arch/x86/xen/setup.c
parent9ffecb10283508260936b96022d4ee43a7798b4c (diff)
downloadtalos-op-linux-24f775a6605a8ffc697c0767fc7ea85656ddb958.tar.gz
talos-op-linux-24f775a6605a8ffc697c0767fc7ea85656ddb958.zip
xen: use correct type for HYPERVISOR_memory_op()
HYPERVISOR_memory_op() is defined to return an "int" value. This is wrong, as the Xen hypervisor will return "long". The sub-function XENMEM_maximum_reservation returns the maximum number of pages for the current domain. An int will overflow for a domain configured with 8TB of memory or more. Correct this by using the correct type. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch/x86/xen/setup.c')
-rw-r--r--arch/x86/xen/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index f5ef6746d47a..4ebfcecc2a8b 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -548,7 +548,7 @@ static unsigned long __init xen_get_max_pages(void)
{
unsigned long max_pages, limit;
domid_t domid = DOMID_SELF;
- int ret;
+ long ret;
limit = xen_get_pages_limit();
max_pages = limit;
OpenPOWER on IntegriCloud