summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/skas/syscall.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2015-05-31 22:59:03 +0200
committerRichard Weinberger <richard@nod.at>2015-05-31 22:59:03 +0200
commit5334cdae407a5778a297a98a75ca61140e37ebfa (patch)
tree8b1c4aaad459fa26fb13b5ef4244d986c831048d /arch/um/kernel/skas/syscall.c
parentum: Remove copy&paste code from init.h (diff)
downloadlinux-5334cdae407a5778a297a98a75ca61140e37ebfa.tar.xz
linux-5334cdae407a5778a297a98a75ca61140e37ebfa.zip
um: Handle tracehook_report_syscall_entry() result
tracehook_report_syscall_entry() is allowed to fail, in case of failure we have to abort the current syscall. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/skas/syscall.c')
-rw-r--r--arch/um/kernel/skas/syscall.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c
index c0681e097432..d9ec0068b623 100644
--- a/arch/um/kernel/skas/syscall.c
+++ b/arch/um/kernel/skas/syscall.c
@@ -18,7 +18,10 @@ void handle_syscall(struct uml_pt_regs *r)
long result;
int syscall;
- syscall_trace_enter(regs);
+ if (syscall_trace_enter(regs)) {
+ result = -ENOSYS;
+ goto out;
+ }
/*
* This should go in the declaration of syscall, but when I do that,
@@ -34,6 +37,7 @@ void handle_syscall(struct uml_pt_regs *r)
result = -ENOSYS;
else result = EXECUTE_SYSCALL(syscall, regs);
+out:
PT_REGS_SET_SYSCALL_RETURN(regs, result);
syscall_trace_leave(regs);