summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-11-17 09:33:00 +0000
committerjeff <jeff@FreeBSD.org>2002-11-17 09:33:00 +0000
commite679ecb8f2d857022782d72982c5d9ac2927c59f (patch)
tree050048ac8e52d1ea01698c364f64ad3982fdb684
parentfac6cd8832ae9e1a7c4f4935fdc4c115c273cb81 (diff)
downloadFreeBSD-src-e679ecb8f2d857022782d72982c5d9ac2927c59f.zip
FreeBSD-src-e679ecb8f2d857022782d72982c5d9ac2927c59f.tar.gz
- Release the imgp vnode prior to freeing exec_map resources to avoid
deadlock.
-rw-r--r--sys/kern/kern_exec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index f01dbaf..e6364bf 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -628,15 +628,15 @@ exec_fail_dealloc:
if (imgp->firstpage)
exec_unmap_first_page(imgp);
- if (imgp->stringbase != NULL)
- kmem_free_wakeup(exec_map, (vm_offset_t)imgp->stringbase,
- ARG_MAX + PAGE_SIZE);
-
if (imgp->vp) {
NDFREE(ndp, NDF_ONLY_PNBUF);
vput(imgp->vp);
}
+ if (imgp->stringbase != NULL)
+ kmem_free_wakeup(exec_map, (vm_offset_t)imgp->stringbase,
+ ARG_MAX + PAGE_SIZE);
+
if (imgp->object)
vm_object_deallocate(imgp->object);
OpenPOWER on IntegriCloud