Skip to contentSkip to conversation

X86: fix variable name collision

PATCH New Joerg Roedel 1 participant 1 message Feb 1, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 X86: fix variable name collision

When compiling KVM on 32 bit Linux there is a variable name collision in the function emulator_write_emulated() with variable 'addr' which is a function parameter and later redefined. The addr parameter for gva_to_gpa is therefore uninitialized. Fixing this by renaming the function parameter to 'address'.

---
 arch/x86/kvm/x86.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/x86.c +2 -2
index 0987191..0f9ea75 100644
@@ -1729,7 +1729,7 @@ int emulator_write_emulated(unsigned long addr,
 }
 EXPORT_SYMBOL_GPL(emulator_write_emulated);
 
-static int emulator_cmpxchg_emulated(unsigned long addr,
+static int emulator_cmpxchg_emulated(unsigned long address,
 				     const void *old,
 				     const void *new,
 				     unsigned int bytes,
@@ -1750,7 +1750,7 @@ static int emulator_cmpxchg_emulated(unsigned long addr,
 		u64 val;
 
 		down_read(&current->mm->mmap_sem);
-		gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, addr);
+		gpa = vcpu->arch.mmu.gva_to_gpa(vcpu, address);
 
 		if (gpa == UNMAPPED_GVA ||
 		   (gpa & PAGE_MASK) == APIC_DEFAULT_PHYS_BASE)
Signature · 9 lines
1.5.3.7




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/