WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] x86: fix improper return value from relinquish_memor

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: fix improper return value from relinquish_memory()
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Wed, 24 Mar 2010 11:07:35 +0000
Delivery-date: Wed, 24 Mar 2010 04:08:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>