aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorRafael Mendonca <[email protected]>2022-10-18 01:27:50 +0000
committerAlex Deucher <[email protected]>2022-10-24 18:44:03 +0000
commit90bfee142af0f0e9d3bec80e7acd5f49b230acf7 (patch)
treeed8202155f59bb8dc858cba310f800995c54af10 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parentdrm/amdgpu: Remove ATC L2 access for MMHUB 2.1.x (diff)
downloadkernel-90bfee142af0f0e9d3bec80e7acd5f49b230acf7.tar.gz
kernel-90bfee142af0f0e9d3bec80e7acd5f49b230acf7.zip
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 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions