]> Git Repo - linux.git/commitdiff
x86, alternative: Call stop_machine_text_poke() on all cpus
authorJason Baron <[email protected]>
Thu, 28 Oct 2010 15:20:27 +0000 (11:20 -0400)
committerH. Peter Anvin <[email protected]>
Fri, 29 Oct 2010 23:42:58 +0000 (16:42 -0700)
Currently, text_poke_smp() passes a NULL as the third argument to
__stop_machine(), which will only run stop_machine_text_poke()
on 1 cpu. Change NULL -> cpu_online_mask, as stop_machine_text_poke()
is intended to be run on all cpus.

I actually didn't notice any problems with stop_machine_text_poke()
only being called on 1 cpu, but found this via code inspection.

Signed-off-by: Jason Baron <[email protected]>
LKML-Reference: <20101028152026[email protected]>
Acked-by: Mathieu Desnoyers <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
arch/x86/kernel/alternative.c

index a36bb90aef5383d68bcf4af0b0c33749d572163a..5ceeca382820c279c539a453b775fd1e16a2f386 100644 (file)
@@ -638,7 +638,7 @@ void *__kprobes text_poke_smp(void *addr, const void *opcode, size_t len)
        atomic_set(&stop_machine_first, 1);
        wrote_text = 0;
        /* Use __stop_machine() because the caller already got online_cpus. */
-       __stop_machine(stop_machine_text_poke, (void *)&tpp, NULL);
+       __stop_machine(stop_machine_text_poke, (void *)&tpp, cpu_online_mask);
        return addr;
 }
 
This page took 0.060983 seconds and 4 git commands to generate.