lkml.org 
[lkml]   [2009]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[BUGFIX 1/2] x86, mce, inject: Use real injectm in raise_local
From
Date
Current raise_local uses struct mce comes from mce_write as parameter
instead of real injectm, so when we set mce.finished = 0 to clear
injected MCE, the real inject stays valid. This will cause the
remaining injectm affects next injection.

To fix this, real injectm is used in raise_local instead of the one on
stack.

This patch is based on the diagnnoses and fixes by Dean Nelson.

Reported-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
---
arch/x86/kernel/cpu/mcheck/mce-inject.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -98,8 +98,9 @@ static struct notifier_block mce_raise_n
};

/* Inject mce on current CPU */
-static int raise_local(struct mce *m)
+static int raise_local(void)
{
+ struct mce *m = &__get_cpu_var(injectm);
int context = MCJ_CTX(m->inject_flags);
int ret = 0;
int cpu = m->extcpu;
@@ -167,12 +168,12 @@ static void raise_mce(struct mce *m)
}
cpu_relax();
}
- raise_local(m);
+ raise_local();
put_cpu();
put_online_cpus();
} else
#endif
- raise_local(m);
+ raise_local();
}

/* Error injection interface */



\
 
 \ /
  Last update: 2009-09-22 08:39    [W:0.026 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site