[PATCH 0/3] drm/amdgpu: three independent fixes in the CS and VM paths
Junrui Luo via B4 Relay <[email protected]> Thu, 06 Aug 2026 12:45:23 +0800
| Newsgroups | org.freedesktop.lists.amd-gfx,org.freedesktop.lists.dri-devel,org.kernel.feeds.b4-sent,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
Three independent fixes; no dependency between them, they can be applied or dropped individually. Patch 1 rejects submissions carrying more than one AMDGPU_CHUNK_ID_FENCE chunk. p->uf_bo is a single-slot field, so every FENCE chunk but the last leaks a BO reference that outlives handle close and process exit. Patch 2 clamps the rounded-up entry count in amdgpu_vm_update_range(). Where AMDGPU_GPU_PAGES_IN_CPU_PAGE is greater than 1, a mapping whose GPU page count is not a multiple of it can round num_entries up past what the cursor holds and trip BUG_ON(size > cur->remaining) in amdgpu_res_next(). 4K-page hosts are unaffected. Patch 3 adds the mapping offset when computing the CPU-side pointer to an IB in amdgpu_cs_patch_ibs(). The page tables are programmed from mapping->offset, so for a mapping created with a non-zero offset_in_bo the kernel inspects different bytes than the GPU executes. Signed-off-by: Junrui Luo <[email protected]> --- Junrui Luo (3): drm/amdgpu: disallow multiple FENCE chunks in one submit drm/amdgpu: fix VM update overrun on non-4K page kernels drm/amdgpu: add the BO-va mapping offset when kmapping an IB drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) --- base-commit: 075b74841bd0065a3bda3440873c747938e69b68 change-id: 20260806-amdgpu-fixes-7ce39504b98d Best regards, -- Junrui Luo <[email protected]>