parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls
[deliverable/linux.git] / arch / parisc / kernel / syscall.S
index fbafa0d0e2bf865db726d15f9c4beb4817afe86c..57b4836b7ecd898e10197aa0d473ea6107b9fb42 100644 (file)
@@ -329,6 +329,7 @@ tracesys_next:
 
        ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
        LDREG   TI_TASK(%r1), %r1
+       LDREG   TASK_PT_GR28(%r1), %r28         /* Restore return value */
        LDREG   TASK_PT_GR26(%r1), %r26         /* Restore the users args */
        LDREG   TASK_PT_GR25(%r1), %r25
        LDREG   TASK_PT_GR24(%r1), %r24
@@ -342,7 +343,8 @@ tracesys_next:
        stw     %r21, -56(%r30)                 /* 6th argument */
 #endif
 
-       comiclr,>>=     __NR_Linux_syscalls, %r20, %r0
+       cmpib,COND(=),n -1,%r20,tracesys_exit /* seccomp may have returned -1 */
+       comiclr,>>      __NR_Linux_syscalls, %r20, %r0
        b,n     .Ltracesys_nosys
 
        LDREGX  %r20(%r19), %r19
This page took 0.025225 seconds and 5 git commands to generate.