summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1997-06-23 21:51:03 +0000
committertegge <tegge@FreeBSD.org>1997-06-23 21:51:03 +0000
commit4b413d416ebecd1b40fddfa6d13042ee66d94932 (patch)
tree4f8f8a93ad0bb21f551ef5b51131d6bd57bc43bc
parentcd2a620cb01eb940a3f22bd6f0e48a936c594c62 (diff)
downloadFreeBSD-src-4b413d416ebecd1b40fddfa6d13042ee66d94932.zip
FreeBSD-src-4b413d416ebecd1b40fddfa6d13042ee66d94932.tar.gz
Don't try upgrading an existing exclusive lock in vm_map_user_pageable.
This should close PR kern/3180. Also remove a bogus unconditional call to vm_map_unlock_read in vm_map_lookup.
-rw-r--r--sys/vm/vm_map.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 26e2318..a271c17 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_map.c,v 1.76 1997/04/13 01:48:35 dyson Exp $
+ * $Id: vm_map.c,v 1.77 1997/06/15 23:33:52 dyson Exp $
*/
/*
@@ -1442,19 +1442,8 @@ vm_map_user_pageable(map, start, end, new_pageable)
/* First we need to allow map modifications */
vm_map_set_recursive(map);
- if (lockmgr(&map->lock, LK_EXCLUPGRADE,
- (void *)0, curproc)) {
- entry->wired_count--;
- entry->eflags &= ~MAP_ENTRY_USER_WIRED;
+ lockmgr(&map->lock, LK_DOWNGRADE,(void *)0, curproc);
- vm_map_clear_recursive(map);
- vm_map_unlock(map);
-
- (void) vm_map_user_pageable(map, start, entry->start, TRUE);
- return rv;
- }
-
-
rv = vm_fault_user_wire(map, entry->start, entry->end);
if (rv) {
@@ -1469,7 +1458,7 @@ vm_map_user_pageable(map, start, end, new_pageable)
}
vm_map_clear_recursive(map);
- lockmgr(&map->lock, LK_DOWNGRADE, (void *)0, curproc);
+ lockmgr(&map->lock, LK_UPGRADE, (void *)0, curproc);
goto rescan;
}
@@ -2455,8 +2444,6 @@ RetryLookup:;
if (lockmgr(&share_map->lock, LK_EXCLUPGRADE,
(void *)0, curproc)) {
- vm_map_unlock_read(map);
-
if (share_map != map)
vm_map_unlock_read(map);
OpenPOWER on IntegriCloud