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 @@ -755,6 +755,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
755
755
if (thread -> group_leader -> mm != thread -> mm )
756
756
return ERR_PTR (- EINVAL );
757
757
758
+ /* If the process just called exec(3), it is possible that the
759
+ * cleanup of the kfd_process (following the release of the mm
760
+ * of the old process image) is still in the cleanup work queue.
761
+ * Make sure to drain any job before trying to recreate any
762
+ * resource for this process.
763
+ */
764
+ flush_workqueue (kfd_process_wq );
765
+
758
766
/*
759
767
* take kfd processes mutex before starting of process creation
760
768
* so there won't be a case where two threads of the same process
@@ -767,14 +775,6 @@ struct kfd_process *kfd_create_process(struct file *filep)
767
775
if (process ) {
768
776
pr_debug ("Process already found\n" );
769
777
} else {
770
- /* If the process just called exec(3), it is possible that the
771
- * cleanup of the kfd_process (following the release of the mm
772
- * of the old process image) is still in the cleanup work queue.
773
- * Make sure to drain any job before trying to recreate any
774
- * resource for this process.
775
- */
776
- flush_workqueue (kfd_process_wq );
777
-
778
778
process = create_process (thread );
779
779
if (IS_ERR (process ))
780
780
goto out ;
You can’t perform that action at this time.
0 commit comments