exit1: destroy the proc/lwp specificdata after calling uvm_proc_exit, as

file systems can still be using it.
This commit is contained in:
ad 2007-03-11 23:19:49 +00:00
parent 31b5ea99cb
commit 1bf149ba4c
1 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_exit.c,v 1.169 2007/03/09 14:11:24 ad Exp $ */
/* $NetBSD: kern_exit.c,v 1.170 2007/03/11 23:19:49 ad Exp $ */
/*-
* Copyright (c) 1998, 1999, 2006, 2007 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.169 2007/03/09 14:11:24 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.170 2007/03/11 23:19:49 ad Exp $");
#include "opt_ktrace.h"
#include "opt_perfctrs.h"
@ -304,13 +304,6 @@ exit1(struct lwp *l, int rv)
if (p->p_emul->e_proc_exit)
(*p->p_emul->e_proc_exit)(p);
/*
* Finalize the last LWP's specificdata, as well as the
* specificdata for the proc itself.
*/
lwp_finispecific(l);
proc_finispecific(p);
/* Collect child u-areas. */
uvm_uarea_drain(false);
@ -324,6 +317,13 @@ exit1(struct lwp *l, int rv)
*/
uvm_proc_exit(p);
/*
* Finalize the last LWP's specificdata, as well as the
* specificdata for the proc itself.
*/
lwp_finispecific(l);
proc_finispecific(p);
/*
* Stop profiling.
*/