Fix address space leak in __fmm_release

Use the object size when freeing address space, instead of the
parameter passed in by the caller. The parameter may be incorrect
due to app or runtime bugs, or when the buffers is an AQL ring
buffer with double mapping workaround.


Change-Id: I00bb31d4520ef969a49d6d5ea723e8a33418acc3


[ROCm/ROCR-Runtime commit: 006f3ee41b]
This commit is contained in:
Felix Kuehling
2016-02-23 19:01:51 -05:00
parent 8ae4e547bc
commit d56931260a
3 changed files with 16 additions and 26 deletions
+1 -1
View File
@@ -181,7 +181,7 @@ hsaKmtFreeMemory(
{
CHECK_KFD_OPEN();
fmm_release(MemoryAddress, SizeInBytes);
fmm_release(MemoryAddress);
return HSAKMT_STATUS_SUCCESS;
}