Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24793476 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Remove sysfs entries after releasing memory"

parents 88656fc9 6b16d08c
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -1057,11 +1057,14 @@ static void kgsl_process_private_close(struct kgsl_device_private *dev_priv,
	 * directories and garbage collect any outstanding resources
	 */

	kgsl_process_uninit_sysfs(private);
	process_release_memory(private);

	/* Release all syncsource objects from process private */
	kgsl_syncsource_process_release_syncsources(private);

	debugfs_remove_recursive(private->debug_root);
	kgsl_process_uninit_sysfs(private);

	/* When using global pagetables, do not detach global pagetable */
	if (private->pagetable->name != KGSL_MMU_GLOBAL_PT)
		kgsl_mmu_detach_pagetable(private->pagetable);
@@ -1071,16 +1074,8 @@ static void kgsl_process_private_close(struct kgsl_device_private *dev_priv,
	list_del(&private->list);
	spin_unlock(&kgsl_driver.proclist_lock);

	/*
	 * Unlock the mutex before releasing the memory and the debugfs
	 * nodes - this prevents deadlocks with the IOMMU and debugfs
	 * locks.
	 */
	mutex_unlock(&kgsl_driver.process_mutex);

	process_release_memory(private);
	debugfs_remove_recursive(private->debug_root);

	kgsl_process_private_put(private);
}