Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/backend_elf.c

    r55b77d9 r8f6c6264  
    139139         */
    140140        if (area->flags & AS_AREA_WRITE) {
    141                 node = list_get_instance(list_first(&area->used_space.leaf_list),
     141                node = list_get_instance(area->used_space.leaf_head.next,
    142142                    btree_node_t, leaf_link);
    143143        } else {
     
    153153         */
    154154        mutex_lock(&area->sh_info->lock);
    155         for (cur = &node->leaf_link; cur != &area->used_space.leaf_list.head;
     155        for (cur = &node->leaf_link; cur != &area->used_space.leaf_head;
    156156            cur = cur->next) {
    157157                unsigned int i;
     
    170170                        if (!(area->flags & AS_AREA_WRITE))
    171171                                if (base >= entry->p_vaddr &&
    172                                     base + P2SZ(count) <= start_anon)
     172                                    base + count * PAGE_SIZE <= start_anon)
    173173                                        continue;
    174174                       
     
    182182                                if (!(area->flags & AS_AREA_WRITE))
    183183                                        if (base >= entry->p_vaddr &&
    184                                             base + P2SZ(j + 1) <= start_anon)
     184                                            base + (j + 1) * PAGE_SIZE <=
     185                                            start_anon)
    185186                                                continue;
    186187                               
    187188                                page_table_lock(area->as, false);
    188189                                pte = page_mapping_find(area->as,
    189                                     base + P2SZ(j), false);
     190                                    base + j * PAGE_SIZE);
    190191                                ASSERT(pte && PTE_VALID(pte) &&
    191192                                    PTE_PRESENT(pte));
    192193                                btree_insert(&area->sh_info->pagemap,
    193                                     (base + P2SZ(j)) - area->base,
     194                                    (base + j * PAGE_SIZE) - area->base,
    194195                                    (void *) PTE_GET_FRAME(pte), NULL);
    195196                                page_table_unlock(area->as, false);
Note: See TracChangeset for help on using the changeset viewer.