Commit 6506a454 authored by Andreas Oetken's avatar Andreas Oetken Committed by Zheng Zengkai
Browse files

nios2: fixed broken sys_clone syscall



stable inclusion
from stable-5.10.20
commit 1fe02a86fa92dd22b79dd25b1d0fe5cab7024f14
bugzilla: 50608

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

[ Upstream commit 9abcfcb2 ]

The tls pointer must be pushed on the stack prior to calling nios2_clone
as it is the 5th function argument. Prior handling of the tls pointer was
done inside former called function copy_thread_tls using the r8 register
from the current_pt_regs directly. This was a bad design and resulted in
the current bug introduced in 04bd52fb.

Fixes: 04bd52fb ("nios2: enable HAVE_COPY_THREAD_TLS, switch to kernel_clone_args")
Signed-off-by: default avatarAndreas Oetken <andreas.oetken@siemens.com>
Signed-off-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent e5ce09f2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment