csky/syscall_trace: Fixup return processing flow

The function tracehook_report_syscall_entry's return value is
__must_check attribute. We should add return processing flow in
ptrace.c and set the syscall number to -1 when failed just like
riscv's.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Cc: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Guo Ren
2019-04-22 14:46:44 +08:00
parent 1a23710c71
commit a691f3334d
2 changed files with 9 additions and 1 deletions

View File

@@ -16,6 +16,13 @@ syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
return regs_syscallid(regs);
}
static inline void
syscall_set_nr(struct task_struct *task, struct pt_regs *regs,
int sysno)
{
regs_syscallid(regs) = sysno;
}
static inline void
syscall_rollback(struct task_struct *task, struct pt_regs *regs)
{