]> git.baikalelectronics.ru Git - kernel.git/commit
nios2: fixed broken sys_clone syscall
authorAndreas Oetken <andreas.oetken@siemens.com>
Fri, 19 Feb 2021 06:41:03 +0000 (14:41 +0800)
committerLey Foon Tan <ley.foon.tan@intel.com>
Fri, 19 Feb 2021 07:02:08 +0000 (15:02 +0800)
commitaae38a45ff568c946d3c6645d3b579864dd634b2
treead794fe45d0c5ce36849ccf39c46565e2548dcca
parent1bf06479c078b7f7fd45ea5d99671ca456ff606e
nios2: fixed broken sys_clone syscall

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 9a288c3b.

Fixes: 9a288c3b ("nios2: enable HAVE_COPY_THREAD_TLS, switch to kernel_clone_args")
Signed-off-by: Andreas Oetken <andreas.oetken@siemens.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
arch/nios2/kernel/entry.S