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

Skip to content
Commit 6aaa0d07 authored by Puranam V G Tejaswi's avatar Puranam V G Tejaswi Committed by Luca Weiss
Browse files

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



Consider a scenario where a context is valid when the check is made in
adreno_dispatcher_queue_cmds(), but by the time we reach _track_context(),
context has been detached. We would try to delete the entry from the
active context list as part of detaching the context though the entry is
not added yet. Now in _track_context() the context is actually added. When
the context is finally destroyed, we would be left with invalid entry in
the list. Next time when a context is added, an attempt would be made to
use a freed entry. Fix this by moving the entry deletion part under
drawctxt lock.

Change-Id: Idab7cbf10987598b3e6395b2d50c20d1990d1f02
Signed-off-by: default avatarPuranam V G Tejaswi <pvgtejas@codeaurora.org>
parent 8f0fb820
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment