]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
accel/amdxdna: Stop job scheduling across aie2_release_resource()
authorLizhi Hou <lizhi.hou@amd.com>
Fri, 30 Jan 2026 00:32:55 +0000 (16:32 -0800)
committerLizhi Hou <lizhi.hou@amd.com>
Fri, 30 Jan 2026 19:52:53 +0000 (11:52 -0800)
commitf1370241fe8045702bc9d0812b996791f0500f1b
tree34ad9b479b6f7abc3ec799194738b0fb623e4418
parenta9162439ad792afcddc04718408ec1380b7a5f63
accel/amdxdna: Stop job scheduling across aie2_release_resource()

Running jobs on a hardware context while it is in the process of
releasing resources can lead to use-after-free and crashes.

Fix this by stopping job scheduling before calling
aie2_release_resource() and restarting it after the release completes.
Additionally, aie2_sched_job_run() now checks whether the hardware
context is still active.

Fixes: 4fd6ca90fc7f ("accel/amdxdna: Refactor hardware context destroy routine")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260130003255.2083255-1-lizhi.hou@amd.com
drivers/accel/amdxdna/aie2_ctx.c