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

Commit 926d1e5c 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 ffc71e9c 9614251d
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -983,11 +983,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);
@@ -997,15 +1000,8 @@ static void kgsl_process_private_close(struct kgsl_device_private *dev_priv,
	list_del(&private->list);
	write_unlock(&kgsl_driver.proclist_lock);

	debugfs_remove_recursive(private->debug_root);

	/*
	 * Unlock the mutex before releasing the memory - this prevents a
	 * deadlock with the IOMMU mutex if a page fault occurs.
	 */
	mutex_unlock(&kgsl_driver.process_mutex);

	process_release_memory(private);
	kgsl_process_private_put(private);
}