[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix loop iterator aliasing in x86/32 memory initialisation.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 5ec5f6960507cf731a53beb593c1e18e538036b2 # Parent 57b3fdca5daed68d14c073be1dc5b813a2841ed4 Fix loop iterator aliasing in x86/32 memory initialisation. Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx> diff -r 57b3fdca5dae -r 5ec5f6960507 xen/arch/x86/x86_32/mm.c --- a/xen/arch/x86/x86_32/mm.c Thu Aug 11 21:38:58 2005 +++ b/xen/arch/x86/x86_32/mm.c Thu Aug 11 21:52:22 2005 @@ -150,7 +150,7 @@ void subarch_init_memory(struct domain *dom_xen) { unsigned long m2p_start_mfn; - int i; + unsigned int i, j; /* * We are rather picky about the layout of 'struct pfn_info'. The @@ -174,12 +174,12 @@ { m2p_start_mfn = l2e_get_pfn( idle_pg_table_l2[l2_linear_offset(RDWR_MPT_VIRT_START) + i]); - for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ ) + for ( j = 0; j < L2_PAGETABLE_ENTRIES; j++ ) { - frame_table[m2p_start_mfn+i].count_info = PGC_allocated | 1; + frame_table[m2p_start_mfn+j].count_info = PGC_allocated | 1; /* Ensure it's only mapped read-only by domains. */ - frame_table[m2p_start_mfn+i].u.inuse.type_info = PGT_gdt_page | 1; - page_set_owner(&frame_table[m2p_start_mfn+i], dom_xen); + frame_table[m2p_start_mfn+j].u.inuse.type_info = PGT_gdt_page | 1; + page_set_owner(&frame_table[m2p_start_mfn+j], dom_xen); } } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |