From 592b614f3469bb83d1158c3dc8c15b67aacfbf4f 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 --- 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 5ec90ac8ad..4ea261b708 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; xentoollog_level lvl; xentoollog_logger *l; -- 2.39.5