debuggers.hg

diff xen/arch/x86/cpu/mcheck/mce.c @ 20963:da7ae6d8838a

x86: MCE fixes

- fill_vmsr_data() leaked a domain reference; since the caller already
obtained one, there's no need to obtain another one here
- intel_UCR_handler() could call put_domain() with a NULL pointer
- mcheck_mca_logout() updated a local data structure that wasn't used
after the update

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Feb 10 09:18:11 2010 +0000 (2010-02-10)
parents ebd2495ec073
children 50ea24db1f88
line diff
     1.1 --- a/xen/arch/x86/cpu/mcheck/mce.c	Wed Feb 10 09:09:35 2010 +0000
     1.2 +++ b/xen/arch/x86/cpu/mcheck/mce.c	Wed Feb 10 09:18:11 2010 +0000
     1.3 @@ -300,13 +300,15 @@ mctelem_cookie_t mcheck_mca_logout(enum 
     1.4  
     1.5  	if (mci != NULL && errcnt > 0) {
     1.6  		x86_mcinfo_lookup(mic, mci, MC_TYPE_GLOBAL);
     1.7 -		mig = (struct mcinfo_global *)mic;
     1.8 -		if (pcc)
     1.9 -			mcg.mc_flags |= MC_FLAG_UNCORRECTABLE;
    1.10 +		mig = container_of(mic, struct mcinfo_global, common);
    1.11 +		if (mic == NULL)
    1.12 +			;
    1.13 +		else if (pcc)
    1.14 +			mig->mc_flags |= MC_FLAG_UNCORRECTABLE;
    1.15  		else if (uc)
    1.16 -			mcg.mc_flags |= MC_FLAG_RECOVERABLE;
    1.17 +			mig->mc_flags |= MC_FLAG_RECOVERABLE;
    1.18  		else
    1.19 -			mcg.mc_flags |= MC_FLAG_CORRECTABLE;
    1.20 +			mig->mc_flags |= MC_FLAG_CORRECTABLE;
    1.21  	}
    1.22  
    1.23