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

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

Merge "msm: kgsl: Use worker to put refcount on mem entry"

parents 18d101ec 6450a9e0
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -171,7 +171,18 @@ imported_mem_show(struct kgsl_process_private *priv,
			}
		}

		kgsl_mem_entry_put(entry);
		/*
		 * If refcount on mem entry is the last refcount, we will
		 * call kgsl_mem_entry_destroy and detach it from process
		 * list. When there is no refcount on the process private,
		 * we will call kgsl_destroy_process_private to do cleanup.
		 * During cleanup, we will try to remove the same sysfs
		 * node which is in use by the current thread and this
		 * situation will end up in a deadloack.
		 * To avoid this situation, use a worker to put the refcount
		 * on mem entry.
		 */
		kgsl_mem_entry_put_deferred(entry);
		spin_lock(&priv->mem_lock);
	}
	spin_unlock(&priv->mem_lock);