~ubuntu-branches/ubuntu/quantal/virtualbox/quantal

« back to all changes in this revision

Viewing changes to src/VBox/Devices/VMMDev/VMMDevHGCM.cpp

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-04-05 12:41:55 UTC
  • mfrom: (3.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120405124155-i7b39tv5ddwhubbe
Tags: 4.1.12-dfsg-2
* Upstream has replaced the 4.1.12 tarball with a new one that fixes a
  crash when creating host only interfaces. (Closes: #667460)
  - Add 36-tarball-respin.patch which contains the diff between the old
    and the new tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    /* Whether the command was cancelled by the guest. */
81
81
    bool fCancelled;
82
82
 
 
83
    /* Whether the command is in the active commands list. */
 
84
    bool fInList;
 
85
 
 
86
    /* Whether the command was saved. */
 
87
    bool fSaved;
 
88
 
83
89
    /* GC physical address of the guest request. */
84
90
    RTGCPHYS        GCPhys;
85
91
 
137
143
 
138
144
        pVMMDevState->pHGCMCmdList = pCmd;
139
145
 
 
146
        pCmd->fInList = true;
 
147
 
140
148
        if (enmCmdType != VBOXHGCMCMDTYPE_LOADSTATE)
141
149
        {
142
150
            /* Loaded commands already have the right type. */
173
181
    {
174
182
        LogFlowFunc(("%p\n", pCmd));
175
183
 
 
184
        if (!pCmd->fInList)
 
185
        {
 
186
            LogFlowFunc(("%p not in the list\n", pCmd));
 
187
            vmmdevHGCMCmdListUnlock (pVMMDevState);
 
188
            return VINF_SUCCESS;
 
189
        }
 
190
 
176
191
        if (pCmd->pNext)
177
192
        {
178
193
            pCmd->pNext->pPrev = pCmd->pPrev;
191
206
            pVMMDevState->pHGCMCmdList = pCmd->pNext;
192
207
        }
193
208
 
 
209
        pCmd->pNext = NULL;
 
210
        pCmd->pPrev = NULL;
 
211
        pCmd->fInList = false;
 
212
 
194
213
        vmmdevHGCMCmdListUnlock (pVMMDevState);
195
214
    }
196
215
 
1773
1792
    VBOXDD_HGCMCALL_COMPLETED_EMT(pCmd, result);
1774
1793
    vmmdevHGCMRemoveCommand (pVMMDevState, pCmd);
1775
1794
 
1776
 
    if (pCmd->fCancelled)
 
1795
    if (pCmd->fCancelled || pCmd->fSaved)
1777
1796
    {
1778
 
        LogFlowFunc(("A cancelled command %p\n", pCmd));
 
1797
        LogFlowFunc(("A cancelled command %p: %d %d\n", pCmd, pCmd->fCancelled, pCmd->fSaved));
1779
1798
    }
1780
1799
    else
1781
1800
    {
2307
2326
            rc = SSMR3PutU32(pSSM, 0);
2308
2327
            AssertRCReturn(rc, rc);
2309
2328
 
 
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;
2310
2333
            vmmdevHGCMRemoveCommand (pVMMDevState, pIter);
2311
2334
 
2312
2335
            pIter = pNext;