From fb6525f7e12fc8c707f3a12dd09655dddbbc16bb Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Mon, 25 Nov 2013 11:05:47 +0000 Subject: [PATCH] tools/xc_restore: Initialise console and store mfns If the console or store mfn chunks are not present in the migration stream, stack junk gets reported for the mfns. XenServer had a very hard to track down VM corruption issue caused by exactly this issue. Xenconsoled would connect to a junk mfn and incremented the ring pointer if the junk happend to look like a valid gfn. Coverity ID: 1056093 1056094 Signed-off-by: Andrew Cooper CC: Ian Campbell Acked-by: Ian Jackson (cherry picked from commit 592b614f3469bb83d1158c3dc8c15b67aacfbf4f) (cherry picked from commit 6d7b67c67039ceac36a780b59c2b890739094b95) Conflicts: tools/xcutils/xc_restore.c --- tools/xcutils/xc_restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xcutils/xc_restore.c b/tools/xcutils/xc_restore.c index 0235579622..81ff16509c 100644 --- a/tools/xcutils/xc_restore.c +++ b/tools/xcutils/xc_restore.c @@ -23,7 +23,7 @@ main(int argc, char **argv) xc_interface *xch; int io_fd, ret; int superpages; - unsigned long store_mfn, console_mfn; + unsigned long store_mfn = 0, console_mfn = 0; if ( (argc != 8) && (argc != 9) ) errx(1, "usage: %s iofd domid store_evtchn "