summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJesse Zhang <Jesse.Zhang@amd.com>2026-11-03 20:12:40 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-11-18 01:47:10 -0500
commit264b67a79010cd3ffa85603d85e594867a45a01d (patch)
tree56bc5e76d29d3bd5155222a53da3a89fc60e83f5 /tools/perf/scripts/python
parenteaf4ff850d97eb608482fa3497f1b89b2e628781 (diff)
drm/amdkfd: don't check the HMM range when getting its pages failed
When allocating the PFN array fails, amdgpu_hmm_range_get_pages() returns -ENOMEM before setting the notifier of the range, but svm_range_validate_and_map() still checks the range, as it is not NULL, before looking at the error. On navi48, setting SVM attributes with failslab: KASAN: null-ptr-deref in range [0x0000000000000050-0x0000000000000057] RIP: 0010:amdgpu_hmm_range_valid+0x66/0xa0 [amdgpu] svm_range_validate_and_map+0xaef/0x4e40 [amdgpu] svm_range_set_attr+0x193e/0x4610 [amdgpu] kfd_ioctl_svm+0x137/0x320 [amdgpu] Check the error first; it is only 0 when the pages were taken. Fixes: c0de552910bb ("drm/amdkfd: clean up the code to free hmm_range") Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit c7036242655cb2c6d14a0d04138536e1ddb5e42c) Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions