This was OKd but forgotten:
https://marc.info/?l=openbsd-tech&m=146001680811549&w=2



relebad used to have more body:
        relebad:
                PRELE(t);
                return (error);
But then PRELE(t); was removed. This diff gets rid of what remains of
relebad.

Index: sys/kern/sys_process.c
===================================================================
RCS file: /cvs/src/sys/kern/sys_process.c,v
retrieving revision 1.69
diff -u -p -r1.69 sys_process.c
--- sys/kern/sys_process.c      31 May 2016 22:34:53 -0000      1.69
+++ sys/kern/sys_process.c      1 Sep 2016 07:30:55 -0000
@@ -454,7 +454,7 @@ sys_ptrace(struct proc *p, void *v, regi
                /* If the address parameter is not (int *)1, set the pc. */
                if ((int *)SCARG(uap, addr) != (int *)1)
                        if ((error = process_set_pc(t, SCARG(uap, addr))) != 0)
-                               goto relebad;
+                               return error;
 
 #ifdef PT_STEP
                /*
@@ -462,7 +462,7 @@ sys_ptrace(struct proc *p, void *v, regi
                 */
                error = process_sstep(t, req == PT_STEP);
                if (error)
-                       goto relebad;
+                       return error;
 #endif
                goto sendsig;
 
@@ -492,7 +492,7 @@ sys_ptrace(struct proc *p, void *v, regi
                 */
                error = process_sstep(t, 0);
                if (error)
-                       goto relebad;
+                       return error;
 #endif
 
                /* give process back to original parent or init */
@@ -522,9 +522,6 @@ sys_ptrace(struct proc *p, void *v, regi
                }
 
                return (0);
-
-       relebad:
-               return (error);
 
        case  PT_KILL:
                if (SCARG(uap, pid) < THREAD_PID_OFFSET && tr->ps_single)

-- 
Michal Mazurek

Reply via email to