[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: 22207fd5c80177b860279653d017474b2812af5e
WARNING: Author mismatch between patch and upstream commit: Backport author: bin.lan.cn@windriver.com Commit author: Vitaly Prosyakvitaly.prosyak@amd.com
Status in newer kernel trees: 6.13.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (different SHA1: e87e08c94c95)
Note: The patch differs from the upstream commit: --- 1: 22207fd5c8017 ! 1: e10d8c3a85ee4 drm/amdgpu: fix use-after-free bug @@ Metadata ## Commit message ## drm/amdgpu: fix use-after-free bug
+ [ Upstream commit 22207fd5c80177b860279653d017474b2812af5e ] + The bug can be triggered by sending a single amdgpu_gem_userptr_ioctl to the AMDGPU DRM driver on any ASICs with an invalid address and size. The bug was reported by Joonkyo Jung joonkyoj@yonsei.ac.kr. @@ Commit message Signed-off-by: Vitaly Prosyak vitaly.prosyak@amd.com Reviewed-by: Christian König christian.koenig@amd.com Signed-off-by: Alex Deucher alexander.deucher@amd.com + [ drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c is renamed from + drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c since + d9483ecd327b ("drm/amdgpu: rename the files for HMM handling"). + The path is changed accordingly to apply the patch on 6.1.y. ] + Signed-off-by: Bin Lan bin.lan.cn@windriver.com + Signed-off-by: He Zhe zhe.he@windriver.com
- ## drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c ## -@@ drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c: static const struct mmu_interval_notifier_ops amdgpu_hmm_hsa_ops = { + ## drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c ## +@@ drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c: static const struct mmu_interval_notifier_ops amdgpu_mn_hsa_ops = { */ - int amdgpu_hmm_register(struct amdgpu_bo *bo, unsigned long addr) + int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr) { + int r; + @@ drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c: static const struct mmu_interval_notifi - return mmu_interval_notifier_insert(&bo->notifier, current->mm, + r = mmu_interval_notifier_insert(&bo->notifier, current->mm, addr, amdgpu_bo_size(bo), - &amdgpu_hmm_hsa_ops); + &amdgpu_mn_hsa_ops); - return mmu_interval_notifier_insert(&bo->notifier, current->mm, addr, - amdgpu_bo_size(bo), -- &amdgpu_hmm_gfx_ops); +- &amdgpu_mn_gfx_ops); + else + r = mmu_interval_notifier_insert(&bo->notifier, current->mm, addr, + amdgpu_bo_size(bo), -+ &amdgpu_hmm_gfx_ops); ++ &amdgpu_mn_gfx_ops); + if (r) + /* + * Make sure amdgpu_hmm_unregister() doesn't call ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.1.y | Success | Success |