summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSergey Matyukevich <sergey.matyukevich@synopsys.com>2022-04-14 10:17:22 +0200
committerVineet Gupta <vgupta@kernel.org>2022-04-18 21:14:20 +0200
commitb1c6ecfdd06907554518ec384ce8e99889d15193 (patch)
tree64adca49b26e376e25235e5173850081ffadc296 /arch
parentLinux 5.18-rc2 (diff)
downloadlinux-b1c6ecfdd06907554518ec384ce8e99889d15193.tar.xz
linux-b1c6ecfdd06907554518ec384ce8e99889d15193.zip
ARC: entry: fix syscall_trace_exit argument
Function syscall_trace_exit expects pointer to pt_regs. However r0 is also used to keep syscall return value. Restore pointer to pt_regs before calling syscall_trace_exit. Cc: <stable@vger.kernel.org> Signed-off-by: Sergey Matyukevich <sergey.matyukevich@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/kernel/entry.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S
index dd77a0c8f740..66ba549b520f 100644
--- a/arch/arc/kernel/entry.S
+++ b/arch/arc/kernel/entry.S
@@ -196,6 +196,7 @@ tracesys_exit:
st r0, [sp, PT_r0] ; sys call return value in pt_regs
;POST Sys Call Ptrace Hook
+ mov r0, sp ; pt_regs needed
bl @syscall_trace_exit
b ret_from_exception ; NOT ret_from_system_call at is saves r0 which
; we'd done before calling post hook above