VirtualBox

Changeset 41467 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
May 28, 2012 10:49:45 PM (13 years ago)
Author:
vboxsync
Message:

AHCI: Fix possible guest memory corruption, it is possible that timed out requests were not canceled properly because they were not added to the task cache yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r40282 r41467  
    56965696        }
    56975697
    5698         /* Add the task to the cache. */
    5699         ASMAtomicWritePtr(&pAhciPort->aCachedTasks[pAhciReq->uTag], pAhciReq);
    57005698        AssertReleaseMsg(ASMAtomicReadU32(&pAhciPort->cTasksActive) > 0 ,
    57015699                         ("Inconsistent request counter\n"));
     
    61986196                AssertMsg(pAhciReq, ("%s: Cannot allocate task state memory!\n"));
    61996197                pAhciReq->enmTxState = AHCITXSTATE_FREE;
     6198                pAhciPort->aCachedTasks[idx] = pAhciReq;
    62006199            }
    62016200            else
     
    62336232                    pAhciPort->fResetDevice = true;
    62346233                    ahciSendD2HFis(pAhciPort, pAhciReq, pAhciReq->cmdFis, true);
    6235                     pAhciPort->aCachedTasks[idx] = pAhciReq;
    62366234
    62376235                    ASMAtomicCmpXchgSize(&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE, fXchg);
     
    62426240                {
    62436241                    ahciFinishStorageDeviceReset(pAhciPort, pAhciReq);
    6244                     pAhciPort->aCachedTasks[idx] = pAhciReq;
    62456242
    62466243                    ASMAtomicCmpXchgSize(&pAhciReq->enmTxState, AHCITXSTATE_FREE, AHCITXSTATE_ACTIVE, fXchg);
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