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 @@ -842,6 +842,14 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
842
842
return ERR_PTR (- EINVAL );
843
843
}
844
844
845
+ /* If the process just called exec(3), it is possible that the
846
+ * cleanup of the kfd_process (following the release of the mm
847
+ * of the old process image) is still in the cleanup work queue.
848
+ * Make sure to drain any job before trying to recreate any
849
+ * resource for this process.
850
+ */
851
+ flush_workqueue (kfd_process_wq );
852
+
845
853
/*
846
854
* take kfd processes mutex before starting of process creation
847
855
* so there won't be a case where two threads of the same process
@@ -860,14 +868,6 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
860
868
if (process ) {
861
869
pr_debug ("Process already found\n" );
862
870
} else {
863
- /* If the process just called exec(3), it is possible that the
864
- * cleanup of the kfd_process (following the release of the mm
865
- * of the old process image) is still in the cleanup work queue.
866
- * Make sure to drain any job before trying to recreate any
867
- * resource for this process.
868
- */
869
- flush_workqueue (kfd_process_wq );
870
-
871
871
process = create_process (thread );
872
872
if (IS_ERR (process ))
873
873
goto out ;
You can’t perform that action at this time.
0 commit comments