[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Clean the arch_memory_op() for-loop header.
# 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
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |