aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasami Hiramatsu <[email protected]>2010-10-14 12:10:36 +0900
committerIngo Molnar <[email protected]>2010-10-14 08:55:28 +0200
commit3caa37519ccbb200c7fbbf6ff4fb306a30f29425 (patch)
treefc2c999dd90d8d47f2a928960f02f6280b14f819
parent087a4eb55971dfcc8df18312faf9393d0a479f3a (diff)
x86: Use __stop_machine() in text_poke_smp()
Use __stop_machine() in text_poke_smp() because the caller must get online_cpus before calling text_poke_smp(), but stop_machine() do it again. We don't need it. Signed-off-by: Masami Hiramatsu <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: [email protected] Cc: Mathieu Desnoyers <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--arch/x86/kernel/alternative.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index cb0e6d385f6d..a36bb90aef53 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -637,7 +637,8 @@ void *__kprobes text_poke_smp(void *addr, const void *opcode, size_t len)
tpp.len = len;
atomic_set(&stop_machine_first, 1);
wrote_text = 0;
- stop_machine(stop_machine_text_poke, (void *)&tpp, NULL);
+ /* Use __stop_machine() because the caller already got online_cpus. */
+ __stop_machine(stop_machine_text_poke, (void *)&tpp, NULL);
return addr;
}