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>
这个提交包含在:
Richard Weinberger
2015-05-31 22:59:03 +02:00
父节点 30b11ee9ae
当前提交 5334cdae40
修改 3 个文件,包含 9 行新增5 行删除

查看文件

@@ -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);