aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
diff options
context:
space:
mode:
authorMaxime Ripard <[email protected]>2025-04-08 14:07:58 +0000
committerMaxime Ripard <[email protected]>2025-04-29 15:28:28 +0000
commit48ccf21fa8dc595c8aa4f1d347b593dcae0727d0 (patch)
tree934251675082298d2469bb08b4ba6ce984746f81 /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
parentdrm: Select DRM_KMS_HELPER from DRM_DEBUG_DP_MST_TOPOLOGY_REFS (diff)
downloadkernel-48ccf21fa8dc595c8aa4f1d347b593dcae0727d0.tar.gz
kernel-48ccf21fa8dc595c8aa4f1d347b593dcae0727d0.zip
drm/tests: shmem: Fix memleak
The drm_gem_shmem_test_get_pages_sgt() gets a scatter-gather table using the drm_gem_shmem_get_sg_table() function and rightfully calls sg_free_table() on it. However, it's also supposed to kfree() the returned sg_table, but doesn't. This leads to a memory leak, reported by kmemleak. Fix it by adding a kunit action to kfree the sgt when the test ends. Reported-by: Philipp Stanner <[email protected]> Closes: https://lore.kernel.org/dri-devel/[email protected]/ Fixes: 93032ae634d4 ("drm/test: add a test suite for GEM objects backed by shmem") Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
0 files changed, 0 insertions, 0 deletions