diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-09 11:16:46 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-09 11:16:46 +0100 |
commit | 6a883b0d6a42592ba812461e41d46435b60c88a7 (patch) | |
tree | c4087f9105db6dd209e70bcaf5c525c0ca8581a7 /tools/libxc/xc_core.c | |
parent | 97e26d34f290c49ecbd82931c32dfae7c1d96b79 (diff) | |
download | xen-6a883b0d6a42592ba812461e41d46435b60c88a7.tar.gz xen-6a883b0d6a42592ba812461e41d46435b60c88a7.tar.bz2 xen-6a883b0d6a42592ba812461e41d46435b60c88a7.zip |
Fix order-of-evaluation issue in xc_domain_dumpcore. The intent is
to move blocks of memory 4096 pages at a time, and a buffer is
allocated for this. Unfortunately, the #define is without
parentheses and %/* are the same order and evaluated left to right.
Result: very big buffer being used 4 pages at a time.
Signed-off-by: Ben Thomas (bthomas@virtualiron.com)
Diffstat (limited to 'tools/libxc/xc_core.c')
-rw-r--r-- | tools/libxc/xc_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c index 34c6d16a8c..6e403f0e99 100644 --- a/tools/libxc/xc_core.c +++ b/tools/libxc/xc_core.c @@ -6,7 +6,7 @@ #include <zlib.h> /* number of pages to write at a time */ -#define DUMP_INCREMENT 4 * 1024 +#define DUMP_INCREMENT (4 * 1024) #define round_pgup(_p) (((_p)+(PAGE_SIZE-1))&PAGE_MASK) static int |