提交 b3f3a1cc 编写于 作者: C Cheng Jian 提交者: Xie XiuQi

livepatch/arm64: use for_each_process_thread instead instead of while_each_thread

euler inclusion
category: bugfix
Bugzilla: 5507
CVE: N/A

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

The commit 0c740d0a ("introduce for_each_thread() to replace the buggy
while_each_thread()") replace while_each_thread. while_each_thread()
and next_thread() should die, almost every lockless.

So use for_each_process_thread which is more safer than others to
check the livepatch activeness function when enable.
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
Reviewed-by: NLi Bin <huawei.libin@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 453d3845
......@@ -109,7 +109,7 @@ int klp_check_calltrace(struct klp_patch *patch, int enable)
.ret = 0
};
do_each_thread(g, t) {
for_each_process_thread(g, t) {
frame.fp = thread_saved_fp(t);
frame.pc = thread_saved_pc(t);
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
......@@ -122,7 +122,7 @@ int klp_check_calltrace(struct klp_patch *patch, int enable)
show_stack(t, NULL);
goto out;
}
} while_each_thread(g, t);
}
out:
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册