diff options
| author | Zilin Guan <zilin@seu.edu.cn> | 2026-01-29 09:05:42 +0000 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-02-05 17:18:33 -0500 |
| commit | 0c44d61945c4a80775292d96460aa2f22e62f86c (patch) | |
| tree | 9caa55720628c53e92f81b90659bcda03b8564b4 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | c9be63d565789b56ca7b0197e2cb78a3671f95a8 (diff) | |
drm/amdgpu: Use kvfree instead of kfree in amdgpu_gmc_get_nps_memranges()
amdgpu_discovery_get_nps_info() internally allocates memory for ranges
using kvcalloc(), which may use vmalloc() for large allocation. Using
kfree() to release vmalloc memory will lead to a memory corruption.
Use kvfree() to safely handle both kmalloc and vmalloc allocations.
Compile tested only. Issue found using a prototype static analysis tool
and code review.
Fixes: b194d21b9bcc ("drm/amdgpu: Use NPS ranges from discovery table")
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
