Message ID | 0e8b3cdfbc167f4bb7790ef744eaa1ac0e6959f9.1470915381.git.amit.shah@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index abe8c60..9b04778 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -604,7 +604,8 @@ void *postcopy_get_tmp_page(MigrationIncomingState *mis) mis->postcopy_tmp_page = mmap(NULL, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (!mis->postcopy_tmp_page) { + if (mis->postcopy_tmp_page == MAP_FAILED) { + mis->postcopy_tmp_page = NULL; error_report("%s: %s", __func__, strerror(errno)); return NULL; }