aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/rtrap_32.S
diff options
context:
space:
mode:
authorGravatar Andreas Larsson <andreas@gaisler.com> 2021-02-04 17:23:41 +0100
committerGravatar David S. Miller <davem@davemloft.net> 2021-02-18 16:15:11 -0800
commitc599a7821be7952033727a30e93bd2d053073c78 (patch)
treedf9b674c803fc84f332c502a184f27a3e99023db /arch/sparc/kernel/rtrap_32.S
parentsparc32: Limit memblock allocation to low memory (diff)
downloadlinux-c599a7821be7952033727a30e93bd2d053073c78.tar.gz
linux-c599a7821be7952033727a30e93bd2d053073c78.tar.bz2
linux-c599a7821be7952033727a30e93bd2d053073c78.zip
sparc32: Preserve clone syscall flags argument for restarts due to signals
This fixes a bug where a clone syscall that is restarted due to a pending signal is restarted with garbage in the register %o0 that holds the clone flags. This keep the original %i0 of a syscall (as seen from the trap handler) in %l6 rather than %l5. This is done because for clone (and also qfork) %l5 is used as a temporary variable in the same register window. Before this, that temporary value would be the value that was then incorrectly used as the orig_i0 argument to do_notify_resume. In order to preserve %l6, the temporary usage of %l6 in ret_sys_call is changed to use %l5 instead and the setting %l6 to 0 or 1 was removed. The use of that 0 or 1 value in %l6 was removed in commit 28e6103665301ce60634e8a77f0b657c6cc099de. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/rtrap_32.S')
-rw-r--r--arch/sparc/kernel/rtrap_32.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/rtrap_32.S b/arch/sparc/kernel/rtrap_32.S
index dca8ed810046..8931fe266346 100644
--- a/arch/sparc/kernel/rtrap_32.S
+++ b/arch/sparc/kernel/rtrap_32.S
@@ -75,7 +75,7 @@ signal_p:
ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr
mov %g2, %o2
- mov %l5, %o1
+ mov %l6, %o1
call do_notify_resume
add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr