Re: [PATCH] call stop_machine_text_poke() on all cpus

From: Masami Hiramatsu
Date: Fri Oct 29 2010 - 00:22:39 EST


(2010/10/29 0:20), Jason Baron wrote:
> 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.

That should be my misunderstand...

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

Thank you very much!

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx>

>
> Signed-off-by: Jason Baron <jbaron@xxxxxxxxxx>
> ---
> arch/x86/kernel/alternative.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> index 9f39a1c..3c3f26f 100644
> --- a/arch/x86/kernel/alternative.c
> +++ b/arch/x86/kernel/alternative.c
> @@ -705,6 +705,6 @@ 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;
> }


--
Masami HIRAMATSU
2nd Dept. Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/