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
This commit is contained in:
Axel Dörfler
2007-03-01 13:52:58 +00:00
parent 0c12332715
commit 528e40c07d
+6 -1
View File
@@ -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,