kernel - missing PRELE() in ptrace(PT_DETACH).
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Thu, 10 Mar 2011 10:31:04 +0000 (19:31 +0900)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Thu, 10 Mar 2011 14:26:36 +0000 (23:26 +0900)
sys/kern/sys_process.c

index bfb1c8e..aff0128 100644 (file)
@@ -508,6 +508,8 @@ kern_ptrace(struct proc *curp, int req, pid_t pid, void *addr,
 
                                pp = pfind(p->p_oppid);
                                proc_reparent(p, pp ? pp : initproc);
+                               if (pp != NULL)
+                                       PRELE(pp);
                        }
 
                        p->p_flag &= ~(P_TRACED | P_WAITED);