Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/kern Pull up following revision(s) (requested by chri...



details:   https://anonhg.NetBSD.org/src/rev/82df7ba2cf7d
branches:  netbsd-6
changeset: 776627:82df7ba2cf7d
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed May 21 21:04:31 2014 +0000

description:
Pull up following revision(s) (requested by christos in ticket #1061):
        sys/kern/kern_exit.c: revision 1.244
Free pid for linux processes. Reported by Mark Davies, fix by dsl@
XXX: pullup 6

diffstat:

 sys/kern/kern_exit.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (34 lines):

diff -r d048bca6dd83 -r 82df7ba2cf7d sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c      Wed May 21 21:02:57 2014 +0000
+++ b/sys/kern/kern_exit.c      Wed May 21 21:04:31 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exit.c,v 1.236.2.2 2012/10/01 23:07:07 riz Exp $  */
+/*     $NetBSD: kern_exit.c,v 1.236.2.3 2014/05/21 21:04:31 bouyer 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.236.2.2 2012/10/01 23:07:07 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.236.2.3 2014/05/21 21:04:31 bouyer Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -540,12 +540,10 @@
         */
        pcu_discard_all(l);
 
-       /*
-        * Remaining lwp resources will be freed in lwp_exit2() once we've
-        * switch to idle context; at that point, we will be marked as a
-        * full blown zombie.
-        */
        mutex_enter(p->p_lock);
+       /* Free the linux lwp id */
+       if ((l->l_pflag & LP_PIDLID) != 0 && l->l_lid != p->p_pid)
+               proc_free_pid(l->l_lid);
        lwp_drainrefs(l);
        lwp_lock(l);
        l->l_prflag &= ~LPR_DETACHED;



Home | Main Index | Thread Index | Old Index