Ignore:
Timestamp:
2014-03-15T19:21:53Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c773adc
Parents:
2034f98 (diff), 8cffdf5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r2034f98 rb0b4592e  
    7676        .page_fault = anon_page_fault,
    7777        .frame_free = anon_frame_free,
     78
     79        .create_shared_data = NULL,
     80        .destroy_shared_data = NULL
    7881};
    7982
     
    190193                return AS_PF_FAULT;
    191194
    192         if (area->sh_info) {
     195        mutex_lock(&area->sh_info->lock);
     196        if (area->sh_info->shared) {
    193197                btree_node_t *leaf;
    194198               
     
    200204                 * mapping, a new frame is allocated and the mapping is created.
    201205                 */
    202                 mutex_lock(&area->sh_info->lock);
    203206                frame = (uintptr_t) btree_search(&area->sh_info->pagemap,
    204207                    upage - area->base, &leaf);
     
    232235                }
    233236                frame_reference_add(ADDR2PFN(frame));
    234                 mutex_unlock(&area->sh_info->lock);
    235237        } else {
    236238
     
    254256                         * Reserve the memory for this page now.
    255257                         */
    256                         if (!reserve_try_alloc(1))
     258                        if (!reserve_try_alloc(1)) {
     259                                mutex_unlock(&area->sh_info->lock);
    257260                                return AS_PF_SILENT;
     261                        }
    258262                }
    259263
     
    262266                km_temporary_page_put(kpage);
    263267        }
     268        mutex_unlock(&area->sh_info->lock);
    264269       
    265270        /*
Note: See TracChangeset for help on using the changeset viewer.