Ignore:
File:
1 edited

Legend:

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

    r5df1963 r83b6ba9f  
    7575        .page_fault = elf_page_fault,
    7676        .frame_free = elf_frame_free,
     77
     78        .create_shared_data = NULL,
     79        .destroy_shared_data = NULL
    7780};
    7881
     
    274277        start_anon = entry->p_vaddr + entry->p_filesz;
    275278
    276         if (area->sh_info) {
     279        mutex_lock(&area->sh_info->lock);
     280        if (area->sh_info->shared) {
    277281                bool found = false;
    278282
     
    281285                 */
    282286               
    283                 mutex_lock(&area->sh_info->lock);
    284287                frame = (uintptr_t) btree_search(&area->sh_info->pagemap,
    285288                    upage - area->base, &leaf);
     
    384387        }
    385388
    386         if (dirty && area->sh_info) {
     389        if (dirty && area->sh_info->shared) {
    387390                frame_reference_add(ADDR2PFN(frame));
    388391                btree_insert(&area->sh_info->pagemap, upage - area->base,
     
    390393        }
    391394
    392         if (area->sh_info)
    393                 mutex_unlock(&area->sh_info->lock);
     395        mutex_unlock(&area->sh_info->lock);
    394396
    395397        page_mapping_insert(AS, upage, frame, as_area_get_flags(area));
Note: See TracChangeset for help on using the changeset viewer.