Changeset 9befb0d in mainline for kernel/generic/src/ipc/ops/pagein.c


Ignore:
Timestamp:
2016-08-30T21:07:17Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f126c87
Parents:
dd5f703
Message:

Increment reference count only for physical memory frames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ops/pagein.c

    rdd5f703 r9befb0d  
    5454                if (pte) {
    5555                        frame = PTE_GET_FRAME(pte);
    56                         frame_reference_add(ADDR2PFN(frame));
     56                        pfn_t pfn = ADDR2PFN(frame);
     57                        if (find_zone(pfn, 1, 0) != (size_t) -1) {
     58                                /*
     59                                 * The frame is in physical memory managed by
     60                                 * the frame allocator.
     61                                 */
     62                                frame_reference_add(ADDR2PFN(frame));
     63                        }
    5764                        IPC_SET_ARG1(answer->data, frame);
    5865                } else {
Note: See TracChangeset for help on using the changeset viewer.