Subversion Repositories HelenOS-historic

Rev

Rev 1437 | Rev 1468 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1437 Rev 1461
Line 514... Line 514...
514
    src_size = src_area->pages * PAGE_SIZE;
514
    src_size = src_area->pages * PAGE_SIZE;
515
    src_flags = src_area->flags;
515
    src_flags = src_area->flags;
516
    src_backend = src_area->backend;
516
    src_backend = src_area->backend;
517
    src_backend_data = src_area->backend_data;
517
    src_backend_data = src_area->backend_data;
518
   
518
   
519
    if (src_size != acc_size) {
519
    if (src_size != acc_size || (src_flags & dst_flags_mask) != dst_flags_mask) {
520
        mutex_unlock(&src_area->lock);
520
        mutex_unlock(&src_area->lock);
521
        mutex_unlock(&src_as->lock);
521
        mutex_unlock(&src_as->lock);
522
        interrupts_restore(ipl);
522
        interrupts_restore(ipl);
523
        return EPERM;
523
        return EPERM;
524
    }
524
    }
Line 552... Line 552...
552
     * attribute set which prevents race condition with
552
     * attribute set which prevents race condition with
553
     * preliminary as_page_fault() calls.
553
     * preliminary as_page_fault() calls.
554
     * The flags of the source area are masked against dst_flags_mask
554
     * The flags of the source area are masked against dst_flags_mask
555
     * to support sharing in less privileged mode.
555
     * to support sharing in less privileged mode.
556
     */
556
     */
557
    dst_area = as_area_create(dst_as, src_flags & dst_flags_mask, src_size, dst_base,
557
    dst_area = as_area_create(dst_as, dst_flags_mask, src_size, dst_base,
558
                  AS_AREA_ATTR_PARTIAL, src_backend, &src_backend_data);
558
                  AS_AREA_ATTR_PARTIAL, src_backend, &src_backend_data);
559
    if (!dst_area) {
559
    if (!dst_area) {
560
        /*
560
        /*
561
         * Destination address space area could not be created.
561
         * Destination address space area could not be created.
562
         */
562
         */