From: Junrui Luo via B4 Relay <devnull+moonafterrain.outlook.com@kernel.org>
To: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Sunil Khatri" <sunil.khatri@amd.com>,
"Jesse.Zhang" <Jesse.Zhang@amd.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linaro-mm-sig@lists.linaro.org,
Junrui Luo <moonafterrain@outlook.com>,
Yuhao Jiang <danisjiang@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH 0/2] drm/amdgpu/userq: fix a leaked fence driver and an unlocked doorbell walk
Date: Mon, 17 Aug 2026 00:11:17 +0800 [thread overview]
Message-ID: <20260817-amdgpu-fixes-v1-0-36d5298da646@outlook.com> (raw)
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>
next reply other threads:[~2026-08-16 16:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 16:11 Junrui Luo via B4 Relay [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260817-amdgpu-fixes-v1-0-36d5298da646@outlook.com \
--to=devnull+moonafterrain.outlook.com@kernel.org \
--cc=Jesse.Zhang@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=danisjiang@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=moonafterrain@outlook.com \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=sunil.khatri@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®