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
This commit is contained in:
Axel Dörfler
2007-08-08 23:51:20 +00:00
parent 1260fa6595
commit a2057fac93
+2 -5
View File
@@ -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) {