Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Cleanup old parent from zombies too. Fixes repeatab...



details:   https://anonhg.NetBSD.org/src/rev/b99cadf412c3
branches:  trunk
changeset: 348729:b99cadf412c3
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Nov 04 18:12:06 2016 +0000

description:
Cleanup old parent from zombies too. Fixes repeatable panic when we try
to signal the already freed zombie parent after the child exits.

diffstat:

 sys/kern/kern_exit.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r a468415bb610 -r b99cadf412c3 sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c      Fri Nov 04 18:11:15 2016 +0000
+++ b/sys/kern/kern_exit.c      Fri Nov 04 18:12:06 2016 +0000
@@ -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 @@
                        if (q->p_opptr == p)
                                q->p_opptr = NULL;
                }
+               PROCLIST_FOREACH(q, &zombproc) {
+                       if (q->p_opptr == p)
+                               q->p_opptr = NULL;
+               }
        }
 
        /*



Home | Main Index | Thread Index | Old Index