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 @@ -807,6 +807,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
807
807
if (thread -> group_leader -> mm != thread -> mm )
808
808
return ERR_PTR (- EINVAL );
809
809
810
+ /* If the process just called exec(3), it is possible that the
811
+ * cleanup of the kfd_process (following the release of the mm
812
+ * of the old process image) is still in the cleanup work queue.
813
+ * Make sure to drain any job before trying to recreate any
814
+ * resource for this process.
815
+ */
816
+ flush_workqueue (kfd_process_wq );
817
+
810
818
/*
811
819
* take kfd processes mutex before starting of process creation
812
820
* so there won't be a case where two threads of the same process
@@ -819,14 +827,6 @@ struct kfd_process *kfd_create_process(struct file *filep)
819
827
if (process ) {
820
828
pr_debug ("Process already found\n" );
821
829
} else {
822
- /* If the process just called exec(3), it is possible that the
823
- * cleanup of the kfd_process (following the release of the mm
824
- * of the old process image) is still in the cleanup work queue.
825
- * Make sure to drain any job before trying to recreate any
826
- * resource for this process.
827
- */
828
- flush_workqueue (kfd_process_wq );
829
-
830
830
process = create_process (thread );
831
831
if (IS_ERR (process ))
832
832
goto out ;
You can’t perform that action at this time.
0 commit comments