提交 faa67424 编写于 作者: M Max Filippov 提交者: Zheng Zengkai

xtensa: fix stop_machine_cpuslocked call in patch_text

stable inclusion
from stable-v5.10.110
commit dac518bbcebf128f48b34701db8578f9f95485e3
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dac518bbcebf128f48b34701db8578f9f95485e3

--------------------------------

commit f406f2d0 upstream.

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: 64711f9a ("xtensa: implement jump_label support")
Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 7d819a95
...@@ -61,7 +61,7 @@ static void patch_text(unsigned long addr, const void *data, size_t sz) ...@@ -61,7 +61,7 @@ static void patch_text(unsigned long addr, const void *data, size_t sz)
.data = data, .data = data,
}; };
stop_machine_cpuslocked(patch_text_stop_machine, stop_machine_cpuslocked(patch_text_stop_machine,
&patch, NULL); &patch, cpu_online_mask);
} else { } else {
unsigned long flags; unsigned long flags;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册