mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Fix a bug in the pfind() changes due to confusing the process returned by
pfind() ('pp') with the process being detached from ptrace. Reported by: bde
This commit is contained in:
parent
f21559815d
commit
6c49a8e295
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76274
@ -381,7 +381,12 @@ ptrace(curp, uap)
|
||||
struct proc *pp;
|
||||
|
||||
pp = pfind(p->p_oppid);
|
||||
proc_reparent(p, pp ? pp : initproc);
|
||||
if (pp != NULL)
|
||||
PROC_UNLOCK(pp);
|
||||
else
|
||||
pp = initproc;
|
||||
PROC_LOCK(p);
|
||||
proc_reparent(p, pp);
|
||||
} else
|
||||
PROC_LOCK(p);
|
||||
p->p_flag &= ~(P_TRACED | P_WAITED);
|
||||
|
Loading…
Reference in New Issue
Block a user