aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/vm/vm_fault.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index fa1261fa12124..d453f7f48cc0b 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -66,7 +66,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_fault.c,v 1.98 1999/01/24 06:04:52 dillon Exp $
+ * $Id: vm_fault.c,v 1.99 1999/02/07 21:48:21 dillon Exp $
*/
/*
@@ -698,6 +698,17 @@ readrest:
*/
/*
+ * Unlock vnode before the lookup to avoid deadlock. E.G.
+ * avoid a deadlock between the inode and exec_map that can
+ * occur due to locks being obtained in different orders.
+ */
+
+ if (fs.vp != NULL) {
+ vput(fs.vp);
+ fs.vp = NULL;
+ }
+
+ /*
* To avoid trying to write_lock the map while another process
* has it read_locked (in vm_map_pageable), we do not try for
* write permission. If the page is still writable, we will