summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_process.c
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2024-05-27 11:08:31 +0200
committerMaxime Ripard <mripard@kernel.org>2024-05-27 11:08:31 +0200
commit375c4d1583948cf2439833e4a85d5a0aee853895 (patch)
tree821f494e7df09af36887f710cfce1fb89600e666 /drivers/gpu/drm/amd/amdkfd/kfd_process.c
parent983095eaf6c161ef73d96152bfc1a99ca051cd57 (diff)
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff)
Merge drm/drm-next into drm-misc-next
Let's start the new release cycle. Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_process.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_process.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 58c1fe542193..451bb058cc62 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -829,6 +829,14 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
if (process) {
pr_debug("Process already found\n");
} else {
+ /* If the process just called exec(3), it is possible that the
+ * cleanup of the kfd_process (following the release of the mm
+ * of the old process image) is still in the cleanup work queue.
+ * Make sure to drain any job before trying to recreate any
+ * resource for this process.
+ */
+ flush_workqueue(kfd_process_wq);
+
process = create_process(thread);
if (IS_ERR(process))
goto out;