summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2013-08-05 08:55:35 +0000
committerattilio <attilio@FreeBSD.org>2013-08-05 08:55:35 +0000
commit899ab645146d3b9d10334951eb65770773ed3630 (patch)
tree668bc05fd597966d485deb8ea05c427ee434fde6 /sys/kern/kern_exec.c
parent05101f7501be1dd160855b1f31fcbe7c123817ec (diff)
downloadFreeBSD-src-899ab645146d3b9d10334951eb65770773ed3630.zip
FreeBSD-src-899ab645146d3b9d10334951eb65770773ed3630.tar.gz
Revert r253939:
We cannot busy a page before doing pagefaults. Infact, it can deadlock against vnode lock, as it tries to vget(). Other functions, right now, have an opposite lock ordering, like vm_object_sync(), which acquires the vnode lock first and then sleeps on the busy mechanism. Before this patch is reinserted we need to break this ordering. Sponsored by: EMC / Isilon storage division Reported by: kib
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 0c8b0c1..c0e1435 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -973,7 +973,7 @@ exec_map_first_page(imgp)
vm_page_wakeup(ma[0]);
}
vm_page_lock(ma[0]);
- vm_page_wire(ma[0]);
+ vm_page_hold(ma[0]);
vm_page_unlock(ma[0]);
VM_OBJECT_WUNLOCK(object);
@@ -994,7 +994,7 @@ exec_unmap_first_page(imgp)
sf_buf_free(imgp->firstpage);
imgp->firstpage = NULL;
vm_page_lock(m);
- vm_page_unwire(m, 0);
+ vm_page_unhold(m);
vm_page_unlock(m);
}
}
OpenPOWER on IntegriCloud