Skip to content

Commit

Permalink
xtensa: fix stop_machine_cpuslocked call in patch_text
Browse files Browse the repository at this point in the history
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: [email protected]
Fixes: 64711f9 ("xtensa: implement jump_label support")
Signed-off-by: Max Filippov <[email protected]>
  • Loading branch information
jcmvbkbc committed Mar 16, 2022
1 parent 89b184f commit f406f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/jump_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f406f2d

Please sign in to comment.