Skip to contentSkip to conversation

xtensa: fix stop_machine_cpuslocked call in patch_text

PATCH New Max Filippov 1 participant 1 message Mar 16, 2022

Subsystems (3)
lore
Share & tools
lore

Max Filippov

author maintainer
#0 lore raw

PATCH 1/1 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.

Fixes 64711f9a47d4 ("xtensa: implement jump_label support")
---
 arch/xtensa/kernel/jump_label.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/xtensa/kernel/jump_label.c +1 -1
index 61cf6497a646..0dde21e0d3de 100644
@@ -61,7 +61,7 @@ static void patch_text(unsigned long addr, const void *data, size_t sz)
 			.data = data,
 		};
 		stop_machine_cpuslocked(patch_text_stop_machine,
-					&patch, NULL);
+					&patch, cpu_online_mask);
 	} else {
 		unsigned long flags;
 
Signature · 1 line
2.30.2