SWDEV-556877 - Ensure pinned memory is released if hsa copy fails (#1137)
Dieser Commit ist enthalten in:
committet von
GitHub
Ursprung
092279449e
Commit
538ebc5409
@@ -729,6 +729,8 @@ bool DmaBlitManager::hsaCopyStagedOrPinned(const_address hostSrc, address hostDs
|
||||
address dst = hostDst + copyOffset;
|
||||
status = rocrCopyBuffer(dst, dstAgent, stagingBuffer, srcAgent, copysize, copyMetadata);
|
||||
if (!status) {
|
||||
// Release Pinned Memory back to pool if any
|
||||
releaseBuffer(outBuffer);
|
||||
break;
|
||||
}
|
||||
} else { // D2H Path
|
||||
@@ -745,6 +747,8 @@ bool DmaBlitManager::hsaCopyStagedOrPinned(const_address hostSrc, address hostDs
|
||||
memcpy(hostDst + copyOffset, stagingBuffer, copysize);
|
||||
}
|
||||
} else {
|
||||
// Release Pinned Memory back to pool if any
|
||||
releaseBuffer(outBuffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren