From 15fdd586e37fea20c9148ea5819b2dcde099cb4a Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 5 May 2002 05:36:28 +0000 Subject: [PATCH] o Remove GIANT_REQUIRED from vm_map_lookup() and vm_map_lookup_done(). o Acquire and release Giant around vm_map_lookup()'s call to vm_object_shadow(). --- sys/vm/vm_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 8a7eebe2d7a..b7f990962ff 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -2763,7 +2763,6 @@ vm_map_lookup(vm_map_t *var_map, /* IN/OUT */ vm_prot_t prot; vm_prot_t fault_type = fault_typea; - GIANT_REQUIRED; RetryLookup:; /* * Lookup the faulting address. @@ -2857,10 +2856,12 @@ RetryLookup:; */ if (vm_map_lock_upgrade(map)) goto RetryLookup; + mtx_lock(&Giant); vm_object_shadow( &entry->object.vm_object, &entry->offset, atop(entry->end - entry->start)); + mtx_unlock(&Giant); entry->eflags &= ~MAP_ENTRY_NEEDS_COPY; vm_map_lock_downgrade(map); } else { @@ -2913,7 +2914,6 @@ vm_map_lookup_done(vm_map_t map, vm_map_entry_t entry) /* * Unlock the main-level map */ - GIANT_REQUIRED; vm_map_unlock_read(map); }