From a2057fac93fd335635afb22afa2a3edaab56704d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 8 Aug 2007 23:51:20 +0000 Subject: [PATCH] Since get_memory_map() can run with interrupts turned off, it can't put up it's reference to the vm_address_space - luckily, it doesn't even need a reference, since it always runs in the current address space, which cannot go away for obvious reasons. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21865 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 9ca4c69f3d..1106e66ac4 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -4387,9 +4387,9 @@ get_memory_map(const void *address, ulong numBytes, physical_entry *table, // in which address space is the address to be found? if (IS_USER_ADDRESS(virtualAddress)) - addressSpace = vm_get_current_user_address_space(); + addressSpace = thread_get_current_thread()->team->address_space; else - addressSpace = vm_get_kernel_address_space(); + addressSpace = vm_kernel_address_space(); if (addressSpace == NULL) return B_ERROR; @@ -4414,7 +4414,6 @@ get_memory_map(const void *address, ulong numBytes, physical_entry *table, break; if ((flags & PAGE_PRESENT) == 0) { panic("get_memory_map() called on unmapped memory!"); - vm_put_address_space(addressSpace); return B_BAD_ADDRESS; } @@ -4445,8 +4444,6 @@ get_memory_map(const void *address, ulong numBytes, physical_entry *table, if (interrupts) map->ops->unlock(map); - vm_put_address_space(addressSpace); - // close the entry list if (status == B_OK) {