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] 32-on-64: Fix error path from memory_op()

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] 32-on-64: Fix error path from memory_op() hypercall.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Jun 2007 11:20:29 -0700
Delivery-date: Wed, 20 Jun 2007 11:18:52 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1182343102 -3600
# Node ID 07be0266f6d88f2a8343b54f36301f3adac88d18
# Parent  50358c4b37f4fcaac1061f1c84a865932401c1be
32-on-64: Fix error path from memory_op() hypercall.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/common/compat/memory.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -r 50358c4b37f4 -r 07be0266f6d8 xen/common/compat/memory.c
--- a/xen/common/compat/memory.c        Wed Jun 20 11:50:16 2007 +0100
+++ b/xen/common/compat/memory.c        Wed Jun 20 13:38:22 2007 +0100
@@ -258,7 +258,8 @@ int compat_memory_op(unsigned int cmd, X
                     compat_pfn_t pfn = nat.rsrv->extent_start.p[start_extent];
 
                     BUG_ON(pfn != nat.rsrv->extent_start.p[start_extent]);
-                    if ( __copy_to_compat_offset(cmp.rsrv.extent_start, 
start_extent, &pfn, 1) )
+                    if ( __copy_to_compat_offset(cmp.rsrv.extent_start,
+                                                 start_extent, &pfn, 1) )
                     {
                         if ( split >= 0 )
                         {
@@ -275,6 +276,10 @@ int compat_memory_op(unsigned int cmd, X
                         break;
                     }
                 }
+
+                /* Bail if there was an error. */
+                if ( (split >= 0) && (end_extent != nat.rsrv->nr_extents) )
+                    split = 0;
             }
             else
                 start_extent = end_extent;

_______________________________________________
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] 32-on-64: Fix error path from memory_op() hypercall., Xen patchbot-unstable <=