diff options
author | Ronny Hegewald <ronny.hegewald@online.de> | 2012-11-27 14:13:39 +0000 |
---|---|---|
committer | Ronny Hegewald <ronny.hegewald@online.de> | 2012-11-27 14:13:39 +0000 |
commit | b98cd5c1b5a6f81a4ee3ac76800fa390dc91cea1 (patch) | |
tree | afe87dec3b75af46ca324db8ee210a0c01d5ef51 /docs/man | |
parent | 3ffb163212caab8b2ce3dbb29fb1ab41219ddfe8 (diff) | |
download | xen-b98cd5c1b5a6f81a4ee3ac76800fa390dc91cea1.tar.gz xen-b98cd5c1b5a6f81a4ee3ac76800fa390dc91cea1.tar.bz2 xen-b98cd5c1b5a6f81a4ee3ac76800fa390dc91cea1.zip |
libxl: fix a variable underflow in libxl_wait_for_free_memory
When xl is called to create a domU and there is not enough memory available,
then the autoballooning is called to extract memory from dom0. During the
ballooning a loop in libxl_wait_for_free_memory() waits unless enough memory
is available to create the domU.
But because of a variable-underflow the loop can finish too soon and xl
finally aborts with the message:
xc: error: panic: xc_dom_boot.c:161: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory
libxl: error: libxl_dom.c:430:libxl__build_pv: xc_dom_boot_mem_init failed: Device or resource busy
libxl: error: libxl_create.c:901:domcreate_rebuild_done: cannot (re-)build domain: -3
The variable-underflow happens when freemem_slack is larger then
info.free_pages*4, because the solution of this operation is converted
implicit to a unsigned int to match the type of memory_kb.
Add a extra check for this condition to solve the problem.
Signed-off-by: Ronny Hegewald <Ronny.Hegewald@online.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'docs/man')
0 files changed, 0 insertions, 0 deletions