File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
drivers/gpu/drm/amd/amdkfd Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -812,6 +812,14 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
812
812
return ERR_PTR (- EINVAL );
813
813
}
814
814
815
+ /* If the process just called exec(3), it is possible that the
816
+ * cleanup of the kfd_process (following the release of the mm
817
+ * of the old process image) is still in the cleanup work queue.
818
+ * Make sure to drain any job before trying to recreate any
819
+ * resource for this process.
820
+ */
821
+ flush_workqueue (kfd_process_wq );
822
+
815
823
/*
816
824
* take kfd processes mutex before starting of process creation
817
825
* so there won't be a case where two threads of the same process
@@ -830,14 +838,6 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
830
838
if (process ) {
831
839
pr_debug ("Process already found\n" );
832
840
} else {
833
- /* If the process just called exec(3), it is possible that the
834
- * cleanup of the kfd_process (following the release of the mm
835
- * of the old process image) is still in the cleanup work queue.
836
- * Make sure to drain any job before trying to recreate any
837
- * resource for this process.
838
- */
839
- flush_workqueue (kfd_process_wq );
840
-
841
841
process = create_process (thread );
842
842
if (IS_ERR (process ))
843
843
goto out ;
You can’t perform that action at this time.
0 commit comments