Skip to contentSkip to conversation

migration: postcopy take proper error return

PATCH In review Dr. David Alan Gilbert (git) 2 participants 3 messages Jul 1, 2020 – Jul 3, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 migration: postcopy take proper error return

From: "Dr. David Alan Gilbert" <[email protected]>

This function returns a boolean success and we're returning -1; lets just use the 'out' error path.

Fixes 58b7c17e226 ("Disable mlock around incoming postcopy")
---
 migration/postcopy-ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/postcopy-ram.c +1 -1
index a36402722b..bef2a3afed 100644
@@ -389,7 +389,7 @@ bool postcopy_ram_supported_by_host(MigrationIncomingState *mis)
      */
     if (munlockall()) {
         error_report("%s: munlockall: %s", __func__,  strerror(errno));
-        return -1;
+        goto out;
     }
 
     /*
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

This function returns a boolean success and we're returning -1; lets just use the 'out' error path.

Fixes 58b7c17e226 ("Disable mlock around incoming postcopy")
---
  migration/postcopy-ram.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
migration/postcopy-ram.c +0 -0
index a36402722b..bef2a3afed 100644

migration/postcopy-ram.c bool postcopy_ram_supported_by_host(MigrationIncomingState *mis) · line 393

Quoted 6 lines
migration/postcopy-ram.c +1 -1
@@ -389,7 +389,7 @@ bool postcopy_ram_supported_by_host(MigrationIncomingState *mis)
       */
      if (munlockall()) {
          error_report("%s: munlockall: %s", __func__,  strerror(errno));
-        return -1;
+        goto out;
      }

Sounds like the right thing to do here.

#2 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 8 lines · * Dr. David Alan Gilbert (git) ([email protected]) wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

This function returns a boolean success and we're returning -1; lets just use the 'out' error path.

Fixes 58b7c17e226 ("Disable mlock around incoming postcopy")

queued

Quoted 21 lines
---
 migration/postcopy-ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/postcopy-ram.c +1 -1
index a36402722b..bef2a3afed 100644
@@ -389,7 +389,7 @@ bool postcopy_ram_supported_by_host(MigrationIncomingState *mis)
      */
     if (munlockall()) {
         error_report("%s: munlockall: %s", __func__,  strerror(errno));
-        return -1;
+        goto out;
     }
 
     /*
Signature · 1 line
2.26.2

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK