]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
accel/amdxdna: Fix deadlock between context destroy and job timeout
authorLizhi Hou <lizhi.hou@amd.com>
Fri, 7 Nov 2025 18:10:50 +0000 (10:10 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:59 +0000 (14:02 +0100)
commit2f13baf62bbd1b38e82b04f062c86e75ee1155a6
treea6efb765cfc30dffebff0c1a59a274b8480e3964
parent677b91705b351951bb50edee9cdd868757d39b09
accel/amdxdna: Fix deadlock between context destroy and job timeout

[ Upstream commit ca2583412306ceda9304a7c4302fd9efbf43e963 ]

Hardware context destroy function holds dev_lock while waiting for all jobs
to complete. The timeout job also needs to acquire dev_lock, this leads to
a deadlock.

Fix the issue by temporarily releasing dev_lock before waiting for all
jobs to finish, and reacquiring it afterward.

Fixes: 4fd6ca90fc7f ("accel/amdxdna: Refactor hardware context destroy routine")
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20251107181050.1293125-1-lizhi.hou@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/accel/amdxdna/aie2_ctx.c