The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/amdgpu/userq: fix a leaked fence driver and an unlocked doorbell walk
@ 2026-08-16 16:11 Junrui Luo via B4 Relay
  2026-08-16 16:11 ` [PATCH 1/2] drm/amdgpu/userq: cancel linked fences on fence driver free Junrui Luo via B4 Relay
  2026-08-16 16:11 ` [PATCH 2/2] drm/amdgpu/userq: hold the doorbell xa lock during hang reset Junrui Luo via B4 Relay
  0 siblings, 2 replies; 6+ messages in thread
From: Junrui Luo via B4 Relay @ 2026-08-16 16:11 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Simona Vetter,
	Sumit Semwal, Sunil Khatri, Jesse.Zhang
  Cc: amd-gfx, dri-devel, linux-kernel, linux-media, linaro-mm-sig,
	Junrui Luo, Yuhao Jiang, stable

Patch 1 cancels the fences still linked on a queue's fence driver when the
queue goes away.  Each of them holds a reference on the driver, so its
refcount never reaches zero and the seq64 slot stays allocated for the
lifetime of the device.

Patch 2 holds xa_lock_irqsave() across the doorbell xarray walk in
mes_userq_detect_and_reset().  That xarray is device wide, so the walk
dereferences queues owned by other drm_files, and nothing keeps them alive
for its duration.

Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
---
Junrui Luo (2):
      drm/amdgpu/userq: cancel linked fences on fence driver free
      drm/amdgpu/userq: hold the doorbell xa lock during hang reset

 drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 71 ++++++++++++++++---------
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c      | 13 ++++-
 2 files changed, 57 insertions(+), 27 deletions(-)
---
base-commit: f5bbbfec59b4e2fb7520a91de3df8a6174325d6a
change-id: 20260816-amdgpu-fixes-18d9598a85ca

Best regards,
-- 
Junrui Luo <moonafterrain@outlook.com>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-24 18:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-16 16:11 [PATCH 0/2] drm/amdgpu/userq: fix a leaked fence driver and an unlocked doorbell walk Junrui Luo via B4 Relay
2026-08-16 16:11 ` [PATCH 1/2] drm/amdgpu/userq: cancel linked fences on fence driver free Junrui Luo via B4 Relay
2026-08-16 16:11 ` [PATCH 2/2] drm/amdgpu/userq: hold the doorbell xa lock during hang reset Junrui Luo via B4 Relay
2026-08-23  6:02   ` Junrui Luo
2026-08-24  8:54     ` Christian König
2026-08-24 18:18       ` Junrui Luo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox