VirtualBox

Changeset 60372 in vbox


Ignore:
Timestamp:
Apr 7, 2016 2:12:17 PM (9 years ago)
Author:
vboxsync
Message:

Runtime/r0drv/linux: bugref:8315: don't set the PG_reserved flag on potential compound pages. Play safe and do this change only on Linux 4.5 and later which would panic in that case (forward-port of r106453)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/VBox

  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r58171 r60372  
    373373    pMemLnx->fContiguous = fContiguous;
    374374
     375#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
    375376    /*
    376377     * Reserve the pages.
     378     *
     379     * Linux >= 4.5 with CONFIG_DEBUG_VM panics when setting PG_reserved on compound
     380     * pages. According to Michal Hocko this shouldn't be necessary anyway because
     381     * as pages which are not on the LRU list are never evictable.
    377382     */
    378383    for (iPage = 0; iPage < cPages; iPage++)
    379384        SetPageReserved(pMemLnx->apPages[iPage]);
     385#endif
    380386
    381387    /*
     
    424430        while (iPage-- > 0)
    425431        {
     432#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
     433            /*
     434             * See SetPageReserved() in rtR0MemObjLinuxAllocPages()
     435             */
    426436            ClearPageReserved(pMemLnx->apPages[iPage]);
     437#endif
    427438#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22)
    428439#else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette