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-changelog

[Xen-changelog] [xen-unstable] [POWERPC][XEN] make sure put_domain() is

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Sep 2006 10:03:15 +0000
Delivery-date: Tue, 19 Sep 2006 03:04:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 2e6c10dc7c0ba804665c6e13db8dbf7efe66f8cc
# Parent  13e406c85c8b113a83c337ce9caaa8dba19b1296
[POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() 
failuer

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

diff -r 13e406c85c8b -r 2e6c10dc7c0b 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

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