diff options
author | Huang Ying <ying.huang@intel.com> | 2009-09-22 02:35:57 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-22 15:06:37 -0400 |
commit | 14c0abf14a5e67e793131116bd97f57da37ccce3 (patch) | |
tree | db58321efd5a4a16e9e107d82c8230d1bae9d375 /arch/x86/kernel/cpu/mcheck/mce-inject.c | |
parent | b417c9fd8690637f0c91479435ab3e2bf450c038 (diff) |
x86: mce, inject: Use real inject-msg in raise_local
Current raise_local() uses a struct mce that comes from mce_write()
as a parameter instead of the real inject-msg, so when we set
mce.finished = 0 to clear injected MCE, the real inject stays
valid.
This will cause the remaining inject-msg affect the next injection,
which is not desired.
To fix this, real inject-msg is used in raise_local instead of the
one on the stack.
This patch is based on the diagnosis and the fixes by Dean Nelson.
Reported-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <1253601357.15717.757.camel@yhuang-dev.sh.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce-inject.c')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce-inject.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c index 7029f0e2acad..472763d92098 100644 --- 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_nb = { | |||
98 | }; | 98 | }; |
99 | 99 | ||
100 | /* Inject mce on current CPU */ | 100 | /* Inject mce on current CPU */ |
101 | static int raise_local(struct mce *m) | 101 | static int raise_local(void) |
102 | { | 102 | { |
103 | struct mce *m = &__get_cpu_var(injectm); | ||
103 | int context = MCJ_CTX(m->inject_flags); | 104 | int context = MCJ_CTX(m->inject_flags); |
104 | int ret = 0; | 105 | int ret = 0; |
105 | int cpu = m->extcpu; | 106 | int cpu = m->extcpu; |
@@ -167,12 +168,12 @@ static void raise_mce(struct mce *m) | |||
167 | } | 168 | } |
168 | cpu_relax(); | 169 | cpu_relax(); |
169 | } | 170 | } |
170 | raise_local(m); | 171 | raise_local(); |
171 | put_cpu(); | 172 | put_cpu(); |
172 | put_online_cpus(); | 173 | put_online_cpus(); |
173 | } else | 174 | } else |
174 | #endif | 175 | #endif |
175 | raise_local(m); | 176 | raise_local(); |
176 | } | 177 | } |
177 | 178 | ||
178 | /* Error injection interface */ | 179 | /* Error injection interface */ |