VirtualBox

Changeset 100475 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 10, 2023 3:59:33 PM (17 months ago)
Author:
vboxsync
Message:

Linux: fix NULL pointer dereference introduced in r158175 (kernel 6.5 support), bugref:10482.

File:
1 edited

Legend:

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

    r100435 r100475  
    13421342    const int cPages = cb >> PAGE_SHIFT;
    13431343    struct task_struct *pTask = rtR0ProcessToLinuxTask(R0Process);
     1344# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
    13441345    struct vm_area_struct **papVMAs;
     1346# endif
    13451347    PRTR0MEMOBJLNX  pMemLnx;
    13461348    int             rc      = VERR_NO_MEMORY;
     
    13701372    if (papVMAs)
    13711373    {
    1372 # else
    1373         RT_NOREF(papVMAs);
    13741374# endif
    13751375        LNX_MM_DOWN_READ(pTask->mm);
     
    14651465            {
    14661466                flush_dcache_page(pMemLnx->apPages[rc]);
    1467 #if RTLNX_VER_MIN(6,3,0)
     1467# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
     1468#  if RTLNX_VER_MIN(6,3,0)
    14681469                vm_flags_set(papVMAs[rc], VM_DONTCOPY | VM_LOCKED);
    1469 #elif GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
     1470#  else
    14701471                papVMAs[rc]->vm_flags |= VM_DONTCOPY | VM_LOCKED;
    1471 #endif
     1472#  endif
     1473# endif
    14721474            }
    14731475
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