VirtualBox

Ignore:
Timestamp:
Jul 10, 2009 8:24:18 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49946
Message:

RTR0MemObj*: correctly reject unsupported alignment requirements (VERR_NOT_SUPPORTED).

File:
1 edited

Legend:

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

    r21314 r21497  
    904904    /* check for unsupported stuff. */
    905905    AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED);
    906     AssertMsgReturn(uAlignment <= PAGE_SIZE, ("%#x\n", uAlignment), VERR_NOT_SUPPORTED);
     906    if (uAlignment > PAGE_SIZE)
     907        return VERR_NOT_SUPPORTED;
    907908
    908909    /*
     
    10181019
    10191020    /*
     1021     * Check that the specified alignment is supported.
     1022     */
     1023    if (uAlignment > PAGE_SIZE)
     1024        return VERR_NOT_SUPPORTED;
     1025
     1026    /*
    10201027     * Let rtR0MemObjLinuxDoMmap do the difficult bits.
    10211028     */
     
    10511058    AssertMsgReturn(!offSub && !cbSub, ("%#x %#x\n", offSub, cbSub), VERR_NOT_SUPPORTED);
    10521059    AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED);
    1053     AssertMsgReturn(uAlignment <= PAGE_SIZE, ("%#x\n", uAlignment), VERR_NOT_SUPPORTED);
     1060    if (uAlignment > PAGE_SIZE)
     1061        return VERR_NOT_SUPPORTED;
    10541062
    10551063    /*
     
    11351143     */
    11361144    if (!pTask)
     1145        return VERR_NOT_SUPPORTED;
     1146    if (uAlignment > PAGE_SIZE)
    11371147        return VERR_NOT_SUPPORTED;
    11381148
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