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 <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
(cherry picked from commit 592b614f34)
(cherry picked from commit 6d7b67c670)

Conflicts:
	tools/xcutils/xc_restore.c
This commit is contained in:
Andrew Cooper authored and Ian Jackson committed 2014-01-09 12:37:52 +00:00
1 parent 7732f0d10d
commit fb6525f7e1
1 file changed
+1 -1
+1 -1
View File
@@ -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 "
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.