From 528e40c07dc772b0c867f6b154170419f831421b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 1 Mar 2007 13:52:58 +0000 Subject: [PATCH] Of course, we need to query the address space of the source area, not the one of the target. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20282 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index 6d71840ef0..798cfa3971 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -1345,7 +1345,7 @@ vm_clone_area(team_id team, const char *name, void **address, uint32 addressSpec // we need to map in everything at this point if (newArea->cache_type == CACHE_TYPE_DEVICE) { // we don't have actual pages to map but a physical area - vm_translation_map *map = &addressSpace->translation_map; + vm_translation_map *map = &sourceArea->address_space->translation_map; map->ops->lock(map); addr_t physicalAddress; @@ -1353,6 +1353,11 @@ vm_clone_area(team_id team, const char *name, void **address, uint32 addressSpec map->ops->query(map, sourceArea->base, &physicalAddress, &oldProtection); + map->ops->unlock(map); + + map = &addressSpace->translation_map; + map->ops->lock(map); + for (addr_t offset = 0; offset < newArea->size; offset += B_PAGE_SIZE) { map->ops->map(map, newArea->base + offset,