Skip to content

drm/amdgpu: three independent fixes in the CS and VM paths

Junrui Luo amd-gfx b4-sent dri-devel lkml stable 1 version Applied

Status from this message: Applied. Thanks!

Get series with b4
b4 am [email protected] change-id 20260806-amdgpu-fixes-7ce39504b98d

Versions newest first

  1. v1 Latest3 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3drm/amdgpu: disallow multiple FENCE chunks in one submitdrivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+4 -02 replies
2/3drm/amdgpu: fix VM update overrun on non-4K page kernelsdrivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+3 -23 replies
3/3drm/amdgpu: add the BO-va mapping offset when kmapping an IBdrivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+1 -11 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchChristian König
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] drm/amdgpu: three independent fixes in the CS and VM paths

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.

---
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,

Signature · 1 line
Junrui Luo <[email protected]>