Skip to content

Commit b1c6ecf

Browse files
Sergey Matyukevichvineetgarc
authored andcommitted
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>
1 parent ce522ba commit b1c6ecf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arc/kernel/entry.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ tracesys_exit:
196196
st r0, [sp, PT_r0] ; sys call return value in pt_regs
197197

198198
;POST Sys Call Ptrace Hook
199+
mov r0, sp ; pt_regs needed
199200
bl @syscall_trace_exit
200201
b ret_from_exception ; NOT ret_from_system_call at is saves r0 which
201202
; we'd done before calling post hook above

0 commit comments

Comments
 (0)