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 @@ -277,6 +277,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
277
277
if (thread -> group_leader -> mm != thread -> mm )
278
278
return ERR_PTR (- EINVAL );
279
279
280
+ /* If the process just called exec(3), it is possible that the
281
+ * cleanup of the kfd_process (following the release of the mm
282
+ * of the old process image) is still in the cleanup work queue.
283
+ * Make sure to drain any job before trying to recreate any
284
+ * resource for this process.
285
+ */
286
+ flush_workqueue (kfd_process_wq );
287
+
280
288
/*
281
289
* take kfd processes mutex before starting of process creation
282
290
* so there won't be a case where two threads of the same process
@@ -289,14 +297,6 @@ struct kfd_process *kfd_create_process(struct file *filep)
289
297
if (process ) {
290
298
pr_debug ("Process already found\n" );
291
299
} else {
292
- /* If the process just called exec(3), it is possible that the
293
- * cleanup of the kfd_process (following the release of the mm
294
- * of the old process image) is still in the cleanup work queue.
295
- * Make sure to drain any job before trying to recreate any
296
- * resource for this process.
297
- */
298
- flush_workqueue (kfd_process_wq );
299
-
300
300
process = create_process (thread );
301
301
if (IS_ERR (process ))
302
302
goto out ;
You can’t perform that action at this time.
0 commit comments