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] Clean the arch_memory_op() for-loop header.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Clean the arch_memory_op() for-loop header.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 26 Nov 2005 14:08:07 +0000
Delivery-date: Sat, 26 Nov 2005 14:08:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b05e1c4bc31b17b4c4a5c8425f20576cf97e32a5
# Parent  5d95ab80f290d2f6a7d322d6cd1992c28fbfd776
Clean the arch_memory_op() for-loop header.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 5d95ab80f290 -r b05e1c4bc31b xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c  Sat Nov 26 09:24:08 2005
+++ b/xen/arch/x86/x86_64/mm.c  Sat Nov 26 09:43:27 2005
@@ -190,7 +190,8 @@
         if ( copy_from_user(&xmml, arg, sizeof(xmml)) )
             return -EFAULT;
 
-        for ( i = 0, v = RDWR_MPT_VIRT_START; v != RDWR_MPT_VIRT_END; 
+        for ( i = 0, v = RDWR_MPT_VIRT_START;
+              (i != xmml.max_extents) && (v != RDWR_MPT_VIRT_END);
               i++, v += 1 << 21 )
         {
             l3e = l4e_to_l3e(idle_pg_table[l4_table_offset(v)])[
@@ -201,8 +202,6 @@
             if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) )
                 break;
             mfn = l2e_get_pfn(l2e) + l1_table_offset(v);
-            if ( i == xmml.max_extents )
-                break;
             if ( put_user(mfn, &xmml.extent_start[i]) )
                 return -EFAULT;
         }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Clean the arch_memory_op() for-loop header., Xen patchbot -unstable <=