Merge branch 'torvalds/master'
[firefly-linux-kernel-4.4.55.git] / arch / um / kernel / skas / syscall.c
index c0681e0974329d783eca8ccb774cbd9b701ae947..d9ec0068b623e573854089b13718042df8b73852 100644 (file)
@@ -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);