[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] x86: fix improper return value from relinquish_memory()



While apparently only a theoretical possibility (domain_kill() has a
BUG_ON() that wasn't reported to trigger so far), I still think it is
better to have the code cleaned up.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-03-22.orig/xen/arch/x86/domain.c       2010-03-22 00:00:00.000000000 
+0100
+++ 2010-03-22/xen/arch/x86/domain.c    2010-03-24 11:57:49.000000000 +0100
@@ -1821,8 +1821,10 @@ static int relinquish_memory(
         {
         case 0:
             break;
-        case -EAGAIN:
         case -EINTR:
+            ret = -EAGAIN;
+            /* fallthrough */
+        case -EAGAIN:
             page_list_add(page, list);
             set_bit(_PGT_pinned, &page->u.inuse.type_info);
             put_page(page);



Attachment: x86-domain-cleanup-EINTR.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.