struct kfd_process *p = container_of(work, struct kfd_process,
                                             release_work);
 
+       kfd_process_dequeue_from_all_devices(p);
+       pqm_uninit(&p->pqm);
+
+       /* Signal the eviction fence after user mode queues are
+        * destroyed. This allows any BOs to be freed without
+        * triggering pointless evictions or waiting for fences.
+        */
+       dma_fence_signal(p->ef);
+
        kfd_process_remove_sysfs(p);
        kfd_iommu_unbind_process(p);
 
        cancel_delayed_work_sync(&p->eviction_work);
        cancel_delayed_work_sync(&p->restore_work);
 
-       mutex_lock(&p->mutex);
-
-       kfd_process_dequeue_from_all_devices(p);
-       pqm_uninit(&p->pqm);
-
        /* Indicate to other users that MM is no longer valid */
        p->mm = NULL;
-       /* Signal the eviction fence after user mode queues are
-        * destroyed. This allows any BOs to be freed without
-        * triggering pointless evictions or waiting for fences.
-        */
-       dma_fence_signal(p->ef);
-
-       mutex_unlock(&p->mutex);
 
        mmu_notifier_put(&p->mmu_notifier);
 }