VirtualBox

Changeset 40718 in vbox for trunk/src/VBox/Devices/VMMDev


Ignore:
Timestamp:
Mar 30, 2012 6:31:04 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77178
Message:

VMMDev: saved HGCM commands must not be completed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp

    r40517 r40718  
    8181    bool fCancelled;
    8282
     83    /* Whether the command is in the active commands list. */
     84    bool fInList;
     85
     86    /* Whether the command was saved. */
     87    bool fSaved;
     88
    8389    /* GC physical address of the guest request. */
    8490    RTGCPHYS        GCPhys;
     
    137143
    138144        pVMMDevState->pHGCMCmdList = pCmd;
     145
     146        pCmd->fInList = true;
    139147
    140148        if (enmCmdType != VBOXHGCMCMDTYPE_LOADSTATE)
     
    174182        LogFlowFunc(("%p\n", pCmd));
    175183
     184        if (!pCmd->fInList)
     185        {
     186            LogFlowFunc(("%p not in the list\n", pCmd));
     187            vmmdevHGCMCmdListUnlock (pVMMDevState);
     188            return VINF_SUCCESS;
     189        }
     190
    176191        if (pCmd->pNext)
    177192        {
     
    191206            pVMMDevState->pHGCMCmdList = pCmd->pNext;
    192207        }
     208
     209        pCmd->pNext = NULL;
     210        pCmd->pPrev = NULL;
     211        pCmd->fInList = false;
    193212
    194213        vmmdevHGCMCmdListUnlock (pVMMDevState);
     
    17741793    vmmdevHGCMRemoveCommand (pVMMDevState, pCmd);
    17751794
    1776     if (pCmd->fCancelled)
    1777     {
    1778         LogFlowFunc(("A cancelled command %p\n", pCmd));
     1795    if (pCmd->fCancelled || pCmd->fSaved)
     1796    {
     1797        LogFlowFunc(("A cancelled command %p: %d %d\n", pCmd, pCmd->fCancelled, pCmd->fSaved));
    17791798    }
    17801799    else
     
    23082327            AssertRCReturn(rc, rc);
    23092328
     2329            /* Mark the command as saved to make sure that it will not be
     2330             * completed later by a still running host service.
     2331             */
     2332            pIter->fSaved = true;
    23102333            vmmdevHGCMRemoveCommand (pVMMDevState, pIter);
    23112334
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