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-ppc-devel

[XenPPC] [xenppc-unstable] [POWERPC][XEN] make sure put_domain() is call

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Sep 2006 15:30:32 +0000
Delivery-date: Tue, 12 Sep 2006 08:56:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 2644e0336cc57aa2acf6009a93c57f2c1e143ff0
# Parent  82ddfe69c62efbe44289b4d80d27492ccea6b043
[POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() 
failuer

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 xen/arch/powerpc/dom0_ops.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff -r 82ddfe69c62e -r 2644e0336cc5 xen/arch/powerpc/dom0_ops.c
--- a/xen/arch/powerpc/dom0_ops.c       Tue Sep 12 06:48:32 2006 -0400
+++ b/xen/arch/powerpc/dom0_ops.c       Tue Sep 12 10:53:46 2006 -0400
@@ -98,15 +98,14 @@ long arch_do_domctl(struct xen_domctl *d
         struct domain *d;
         unsigned int log = domctl->u.real_mode_area.log;
 
+        ret = -ESRCH;
         d = find_domain_by_id(domctl->domain);
-        if (d == NULL)
-            return -ESRCH;
-
-        if (!cpu_rma_valid(log))
-            return -EINVAL;
-
-        ret = allocate_rma(d, log - PAGE_SHIFT);
-        put_domain(d);
+        if (d != NULL) {
+            ret = -EINVAL;
+            if (cpu_rma_valid(log))
+                ret = allocate_rma(d, log - PAGE_SHIFT);
+            put_domain(d);
+        }
     }
     break;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] [POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer, Xen patchbot-xenppc-unstable <=