Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: fix stop_machine_cpuslocked call in patch_text

patch_text must invoke patch_text_stop_machine on all online CPUs, but
it calls stop_machine_cpuslocked with NULL cpumask. As a result only one
CPU runs patch_text_stop_machine potentially leaving stale icache
entries on other CPUs. Fix that by calling stop_machine_cpuslocked with
cpu_online_mask as the last argument.

Cc: stable@vger.kernel.org
Fixes: 64711f9a47d4 ("xtensa: implement jump_label support")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

+1 -1
+1 -1
arch/xtensa/kernel/jump_label.c
··· 61 61 .data = data, 62 62 }; 63 63 stop_machine_cpuslocked(patch_text_stop_machine, 64 - &patch, NULL); 64 + &patch, cpu_online_mask); 65 65 } else { 66 66 unsigned long flags; 67 67