Changeset 64020 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Sep 26, 2016 4:47:34 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r64018 r64020 5881 5881 VBOXDD_AHCI_REQ_COMPLETED(pAhciReq, rcReq, pAhciReq->uOffset, pAhciReq->cbTransfer); 5882 5882 5883 /*5884 * Clear the request structure from the active request list first so it doesn't get cancelled5885 * while we complete it. If the request is not in the active list anymore it was already canceled5886 * and we have to make sure to not copy anything to guest memory because the guest might use it5887 * for other things already.5888 */5889 bool fReqErrSaved = false;5890 5891 5883 if (rcReq != VERR_PDM_MEDIAEX_IOREQ_CANCELED) 5892 5884 { … … 5929 5921 { 5930 5922 ahciReqSetStatus(pAhciReq, ID_ERR, ATA_STAT_READY | ATA_STAT_ERR); 5931 fReqErrSaved = ASMAtomicCmpXchgPtr(&pAhciPort->pTaskErr, pAhciReq, NULL); 5923 /* 5924 * We have to duplicate the request here as the underlying I/O 5925 * request will be freed later. 5926 */ 5927 PAHCIREQ pReqDup = (PAHCIREQ)RTMemDup(pAhciReq, sizeof(AHCIREQ)); 5928 if ( pReqDup 5929 && !ASMAtomicCmpXchgPtr(&pAhciPort->pTaskErr, pReqDup, NULL)) 5930 RTMemFree(pReqDup); 5932 5931 } 5933 5932 else … … 6025 6024 PDMDevHlpAsyncNotificationCompleted(pAhciPort->pDevInsR3); 6026 6025 6027 /* Don't free the request yet when it is saved for the error log page. */6026 /* Don't free the request if it is on the stack. */ 6028 6027 if ( pAhciReq 6029 && !(pAhciReq->fFlags & AHCI_REQ_IS_ON_STACK) 6030 && !fReqErrSaved) 6028 && !(pAhciReq->fFlags & AHCI_REQ_IS_ON_STACK)) 6031 6029 ahciR3ReqFree(pAhciPort, pAhciReq); 6032 6030 return fCanceled;
Note:
See TracChangeset
for help on using the changeset viewer.