[PATCH] s390: uml ptrace fixes
[deliverable/linux.git] / arch / s390 / kernel / ptrace.c
index 329d9391c83d2d3b9084dcbda16caf45054027bc..06afa3103ace75143d44258c215cc9c3d1a7fb00 100644 (file)
@@ -760,6 +760,13 @@ syscall_trace(struct pt_regs *regs, int entryexit)
        ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
                                 ? 0x80 : 0));
 
+       /*
+        * If the debuffer has set an invalid system call number,
+        * we prepare to skip the system call restart handling.
+        */
+       if (!entryexit && regs->gprs[2] >= NR_syscalls)
+               regs->trap = -1;
+
        /*
         * this isn't the same as continuing with a signal, but it will do
         * for normal use.  strace only continues with a signal if the
This page took 0.025653 seconds and 5 git commands to generate.