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

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

Merge "msm: kgsl: Fix possible use-after-free while adding context to active list"

parents 7cbd5863 45f301e5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -444,11 +444,13 @@ void adreno_drawctxt_detach(struct kgsl_context *context)
	drawctxt = ADRENO_CONTEXT(context);
	rb = drawctxt->rb;

	spin_lock(&drawctxt->lock);

	spin_lock(&adreno_dev->active_list_lock);
	list_del_init(&drawctxt->active_node);
	spin_unlock(&adreno_dev->active_list_lock);

	spin_lock(&drawctxt->lock);

	count = drawctxt_detach_drawobjs(drawctxt, list);
	spin_unlock(&drawctxt->lock);