Skip to contentSkip to conversation

tmem: fixup 2010 cleanup patch that breaks tmem save/restore

PATCH In review Dan Magenheimer 2 participants 2 messages Sep 4, 2012 – Sep 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tmem: fixup 2010 cleanup patch that breaks tmem save/restore

20918:a3fa6d444b25 "Fix domain reference leaks" (in Feb 2010, by Jan) does some cleanup in addition to the leak fixes. Unfortunately, that cleanup inadvertently resulted in an incorrect fallthrough in a switch statement which breaks tmem save/restore.

That broken patch was apparently applied to 4.0-testing and 4.1-testing so those are broken as well.

What is the process now for requesting back-patches to 4.0 and 4.1?

(Side note: This does not by itself entirely fix save/restore in 4.2.)

xen/common/tmem.c +2 -0
diff -r 1dfbae8dd282 xen/common/tmem.c
@@ -2404,6 +2404,7 @@ static NOINLINE int tmemc_save_subop(int
         *uuid++ = pool->uuid[0];
         *uuid = pool->uuid[1];
         rc = 0;
+        break;
     case TMEMC_SAVE_END:
         client->live_migrating = 0;
         if ( !list_empty(&client->persistent_invalidated_list) )
@@ -2412,6 +2413,7 @@ static NOINLINE int tmemc_save_subop(int
                 pgp_free_from_inv_list(client,pgp);
         client->frozen = client->was_frozen;
         rc = 0;
+        break;
     }
     return rc;
 }
xen/common/tmem.c +2 -0
diff -r 1dfbae8dd282 xen/common/tmem.c
@@ -2404,6 +2404,7 @@ static NOINLINE int tmemc_save_subop(int
         *uuid++ = pool->uuid[0];
         *uuid = pool->uuid[1];
         rc = 0;
+        break;
     case TMEMC_SAVE_END:
         client->live_migrating = 0;
         if ( !list_empty(&client->persistent_invalidated_list) )
@@ -2412,6 +2413,7 @@ static NOINLINE int tmemc_save_subop(int
                 pgp_free_from_inv_list(client,pgp);
         client->frozen = client->was_frozen;
         rc = 0;
+        break;
     }
     return rc;
 }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Dan Magenheimer

20918:a3fa6d444b25 "Fix domain reference leaks" (in Feb 2010, by Jan) does some cleanup in addition to the leak fixes. Unfortunately, that cleanup inadvertently resulted in an incorrect fallthrough in a switch statement which breaks tmem save/restore.

Oh, I'm sorry for that. We had spotted these missing breaks in the course of the XSA-15 investigations too, so I'm having a similar patch pending (deferred its posting until after the publishing of that advisory). I'd prefer the security ones to go in first, and this one (or mine, which has some more cleanup in it) on top. If it's going to be yours, then it would need re-basing, as the security patches will break the context of the first hunk.

Quoted 2 lines

That broken patch was apparently applied to 4.0-testing and 4.1-testing so those are broken as well.

The patch actually went in before 4.0.0-rc3, i.e. before 4.0-testing got branched off.

Quoted 1 line

What is the process now for requesting back-patches to 4.0 and 4.1?

Unless someone steps up to maintain the 4.0 tree, it'll be considered dead with the release of 4.2.

For 4.1, I'll be making sure to apply it there too once it comes through the unstable stage testing.

Quoted 3 lines

(Side note: This does not by itself entirely fix save/restore in 4.2.)

With the above, in any case

Jan

Quoted 19 lines

diff -r 1dfbae8dd282 xen/common/tmem.c

xen/common/tmem.c +2 -0
@@ -2404,6 +2404,7 @@ static NOINLINE int tmemc_save_subop(int
         *uuid++ = pool->uuid[0];
         *uuid = pool->uuid[1];
         rc = 0;
+        break;
     case TMEMC_SAVE_END:
         client->live_migrating = 0;
         if ( !list_empty(&client->persistent_invalidated_list) )
@@ -2412,6 +2413,7 @@ static NOINLINE int tmemc_save_subop(int
                 pgp_free_from_inv_list(client,pgp);
         client->frozen = client->was_frozen;
         rc = 0;
+        break;
     }
     return rc;
 }