Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Free pid for linux processes. Reported by Mark Davi...
details: https://anonhg.NetBSD.org/src/rev/ccdd368e45c8
branches: trunk
changeset: 329076:ccdd368e45c8
user: christos <christos%NetBSD.org@localhost>
date: Mon May 05 15:45:32 2014 +0000
description:
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 b2534517b795 -r ccdd368e45c8 sys/kern/kern_exit.c
--- a/sys/kern/kern_exit.c Mon May 05 08:13:31 2014 +0000
+++ b/sys/kern/kern_exit.c Mon May 05 15:45:32 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exit.c,v 1.243 2013/06/09 01:13:47 riz Exp $ */
+/* $NetBSD: kern_exit.c,v 1.244 2014/05/05 15:45:32 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.243 2013/06/09 01:13:47 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.244 2014/05/05 15:45:32 christos Exp $");
#include "opt_ktrace.h"
#include "opt_perfctrs.h"
@@ -541,12 +541,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