Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
[firefly-linux-kernel-4.4.55.git] / arch / arm / kernel / entry-common.S
index 978eac57e04a783f8901a16986f6d88f96f125ba..417bac1846bdeb71dc475bfe7bee3e729623caa4 100644 (file)
@@ -86,14 +86,26 @@ ENDPROC(ret_to_user)
  */
 ENTRY(ret_from_fork)
        bl      schedule_tail
+       cmp     r5, #0
+       movne   r0, r4
+       movne   lr, pc
+       movne   pc, r5
        get_thread_info tsk
-       mov     why, #1
        b       ret_slow_syscall
 ENDPROC(ret_from_fork)
 
        .equ NR_syscalls,0
 #define CALL(x) .equ NR_syscalls,NR_syscalls+1
 #include "calls.S"
+
+/*
+ * Ensure that the system call table is equal to __NR_syscalls,
+ * which is the value the rest of the system sees
+ */
+.ifne NR_syscalls - __NR_syscalls
+.error "__NR_syscalls is not equal to the size of the syscall table"
+.endif
+
 #undef CALL
 #define CALL(x) .long x
 
@@ -508,11 +520,6 @@ sys_vfork_wrapper:
                b       sys_vfork
 ENDPROC(sys_vfork_wrapper)
 
-sys_execve_wrapper:
-               add     r3, sp, #S_OFF
-               b       sys_execve
-ENDPROC(sys_execve_wrapper)
-
 sys_clone_wrapper:
                add     ip, sp, #S_OFF
                str     ip, [sp, #4]