From: tip-bot for Huang Ying <ying.huang@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
seto.hidetoshi@jp.fujitsu.com, dnelson@redhat.com,
ying.huang@intel.com, ak@linux.intel.com, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:x86/urgent] x86: mce, inject: Use real inject-msg in raise_local
Date: Tue, 22 Sep 2009 19:09:43 GMT [thread overview]
Message-ID: <tip-14c0abf14a5e67e793131116bd97f57da37ccce3@git.kernel.org> (raw)
In-Reply-To: <1253601357.15717.757.camel@yhuang-dev.sh.intel.com>
Commit-ID: 14c0abf14a5e67e793131116bd97f57da37ccce3
Gitweb: http://git.kernel.org/tip/14c0abf14a5e67e793131116bd97f57da37ccce3
Author: Huang Ying <ying.huang@intel.com>
AuthorDate: Tue, 22 Sep 2009 14:35:57 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 22 Sep 2009 21:06:37 +0200
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>
---
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 7029f0e..472763d 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 = {
};
/* 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 */
prev parent reply other threads:[~2009-09-22 19:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 6:35 [BUGFIX 1/2] x86, mce, inject: Use real injectm " Huang Ying
2009-09-22 19:09 ` tip-bot for Huang Ying [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-14c0abf14a5e67e793131116bd97f57da37ccce3@git.kernel.org \
--to=ying.huang@intel.com \
--cc=ak@linux.intel.com \
--cc=dnelson@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®