Skip to content

Commit

Permalink
ARC: entry: fix syscall_trace_exit argument
Browse files Browse the repository at this point in the history
commit b1c6ecf upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sergey Matyukevich authored and gregkh committed Apr 27, 2022
1 parent f13ab82 commit 74364b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74364b4

Please sign in to comment.