diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2010-03-03 22:38:50 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-04 05:39:21 -0500 |
commit | e5a11016643d1ab7172193591506d33a844734cc (patch) | |
tree | 45e9c865c1e25c19142cb395e98ef13dd6d6f145 /arch/x86/kernel/alternative.c | |
parent | 32cb0dd50672056e510ccab442dc9c3a03be649e (diff) |
x86: Issue at least one memory barrier in stop_machine_text_poke()
Fix stop_machine_text_poke() to issue smp_mb() before exiting
waiting loop, and use cpu_relax() for waiting.
Changes in v2:
- Don't use ACCESS_ONCE().
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
Cc: Jason Baron <jbaron@redhat.com>
LKML-Reference: <20100304033850.3819.74590.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r-- | arch/x86/kernel/alternative.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index c41f13c15e8f..e0b877099470 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
@@ -595,8 +595,8 @@ static int __kprobes stop_machine_text_poke(void *data) | |||
595 | wrote_text = 1; | 595 | wrote_text = 1; |
596 | } else { | 596 | } else { |
597 | while (!wrote_text) | 597 | while (!wrote_text) |
598 | smp_rmb(); | 598 | cpu_relax(); |
599 | sync_core(); | 599 | smp_mb(); /* Load wrote_text before following execution */ |
600 | } | 600 | } |
601 | 601 | ||
602 | flush_icache_range((unsigned long)tpp->addr, | 602 | flush_icache_range((unsigned long)tpp->addr, |