Skip to contentSkip to conversation

tmem: typo causes incorrect return on out-of-memory

PATCH New Dan Magenheimer 1 participant 1 message Mar 9, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tmem: typo causes incorrect return on out-of-memory

This classic typo in tmem would result in a false positive report on a tmem "put" operation if a (unfragmented) page of memory is completely unavailable.

xen/common/tmem.c +1 -1
diff -r b8d2a4134a68 xen/common/tmem.c
@@ -1308,7 +1308,7 @@ copy_uncompressed:
 copy_uncompressed:
     if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
     {
-        ret == -ENOMEM;
+        ret = -ENOMEM;
         goto delete_and_free;
     }
     /* tmh_copy_from_client properly handles len==0 (TMEM_NEW_PAGE) */
xen/common/tmem.c +1 -1
diff -r b8d2a4134a68 xen/common/tmem.c
@@ -1308,7 +1308,7 @@ copy_uncompressed:
 copy_uncompressed:
     if ( ( pgp->pfp = tmem_page_alloc(pool) ) == NULL )
     {
-        ret == -ENOMEM;
+        ret = -ENOMEM;
         goto delete_and_free;
     }
     /* tmh_copy_from_client properly handles len==0 (TMEM_NEW_PAGE) */

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