diff options
author | Lizhi Hou <lizhi.hou@amd.com> | 2024-12-06 13:59:55 -0800 |
---|---|---|
committer | Jeffrey Hugo <quic_jhugo@quicinc.com> | 2024-12-13 09:32:57 -0700 |
commit | cfc722fc1c72e415d5f473affcdb3f3f556233f6 (patch) | |
tree | 443212d17975f59bd6d6ca5561ff02464d8c14f7 | |
parent | c3772d6c04c8a61c0e11831e4de857aff95385f0 (diff) |
accel/amdxdna: Replace mmput with mmput_async to avoid dead lock
Hardware mailbox message receiving handler calls mmput to release the
process mm. If the process has already exited, the mmput here may call mmu
notifier handler, amdxdna_hmm_invalidate, which will cause a dead lock.
Using mmput_async instead prevents this dead lock.
Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241206220001.164049-3-lizhi.hou@amd.com
-rw-r--r-- | drivers/accel/amdxdna/aie2_ctx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c index 90e8d87666a9..b5282555bbf2 100644 --- a/drivers/accel/amdxdna/aie2_ctx.c +++ b/drivers/accel/amdxdna/aie2_ctx.c @@ -179,7 +179,7 @@ aie2_sched_notify(struct amdxdna_sched_job *job) up(&job->hwctx->priv->job_sem); job->job_done = true; dma_fence_put(fence); - mmput(job->mm); + mmput_async(job->mm); aie2_job_put(job); } |