VirtualBox

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


Ignore:
Timestamp:
Oct 26, 2014 5:40:21 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96682
Message:

Storage/AHCI: Free the I/O memory of cached request structures before unmounting the CD/DVD medium. Fixes a crash when a medium was removed from a drive without inserting a new one before the AHCI controller is destroyed

File:
1 edited

Legend:

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

    r53115 r53147  
    943943                                void *pvBuf, size_t cbBuf);
    944944static bool ahciCancelActiveTasks(PAHCIPort pAhciPort, PAHCIREQ pAhciReqExcept);
     945static void ahciReqMemFree(PAHCIPort pAhciPort, PAHCIREQ pAhciReq, bool fForceFree);
    945946#endif
    946947RT_C_DECLS_END
     
    46354636                    PAHCI pAhci = pAhciPort->CTX_SUFF(pAhci);
    46364637                    PPDMDEVINS pDevIns = pAhci->CTX_SUFF(pDevIns);
     4638
     4639                    /*
     4640                     * Free the I/O memory of all cached tasks of this port
     4641                     * because the driver providing I/O memory allocation interface
     4642                     * is about to be destroyed.
     4643                     */
     4644                    for (uint32_t i = 0; i < AHCI_NR_COMMAND_SLOTS; i++)
     4645                    {
     4646                        if (pAhciPort->aCachedTasks[i])
     4647                            ahciReqMemFree(pAhciPort, pAhciPort->aCachedTasks[i], true /* fForceFree */);
     4648                    }
    46374649
    46384650                    rc = VMR3ReqPriorityCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,
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