Cleanup old parent from zombies too. Fixes repeatable panic when we try

to signal the already freed zombie parent after the child exits.
This commit is contained in:
christos 2016-11-04 18:12:06 +00:00
parent acc190f453
commit e8fde31e58
1 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_exit.c,v 1.261 2016/11/03 20:58:25 christos Exp $ */
/* $NetBSD: kern_exit.c,v 1.262 2016/11/04 18:12:06 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.261 2016/11/03 20:58:25 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.262 2016/11/04 18:12:06 christos Exp $");
#include "opt_ktrace.h"
#include "opt_dtrace.h"
@ -457,6 +457,10 @@ exit1(struct lwp *l, int exitcode, int signo)
if (q->p_opptr == p)
q->p_opptr = NULL;
}
PROCLIST_FOREACH(q, &zombproc) {
if (q->p_opptr == p)
q->p_opptr = NULL;
}
}
/*