From: "Joerg Roedel" Subject: [PATCH] X86: fix variable name collision Date: Fri, 1 Feb 2008 17:49:59 +0100 Message-ID: <1201884599-1015-1-git-send-email-joerg.roedel@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Joerg Roedel To: "Avi Kivity" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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'. Signed-off-by: Joerg Roedel --- arch/x86/kvm/x86.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0987191..0f9ea75 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -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(¤t->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) -- 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/