All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xc_core.c - Fix order of evaluation issue in xc_domain_dumpcore
@ 2006-03-09  1:41 Ben Thomas
  0 siblings, 0 replies; only message in thread
From: Ben Thomas @ 2006-03-09  1:41 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

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.  Luckily,
the fix is simple.

Signed-off-by: Ben Thomas (bthomas@virtualiron.com)

-- 
------------------------------------------------------------------------
Ben Thomas                                         Virtual Iron Software
bthomas@virtualiron.com                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                    Lowell, MA 01851

[-- Attachment #2: xc_core.patch --]
[-- Type: text/x-patch, Size: 382 bytes --]

diff -r 96678f701d42 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c	Mon Mar  6 11:12:48 2006 -0500
+++ b/tools/libxc/xc_core.c	Wed Mar  8 20:36:21 2006 -0500
@@ -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

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-09  1:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-09  1:41 [PATCH] xc_core.c - Fix order of evaluation issue in xc_domain_dumpcore Ben Thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.