diff options
| author | Rafael Mendonca <[email protected]> | 2022-10-17 22:27:50 -0300 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-10-24 14:34:27 -0400 |
| commit | 7b5a4d7b9e2952a15c8d2b2391dfacd7ce841a1a (patch) | |
| tree | de593280b53e96e93f382781fea5397093abf6ea /tools/perf/scripts/python | |
| parent | 20293269d81779a0d0c0865f5877b240c3335c97 (diff) | |
drm/amdkfd: Fix memory leak in kfd_mem_dmamap_userptr()
If the number of pages from the userptr BO differs from the SG BO then the
allocated memory for the SG table doesn't get freed before returning
-EINVAL, which may lead to a memory leak in some error paths. Fix this by
checking the number of pages before allocating memory for the SG table.
Fixes: 264fb4d332f5 ("drm/amdgpu: Add multi-GPU DMA mapping helpers")
Signed-off-by: Rafael Mendonca <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions