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

Skip to content
Commit 5a9059f4 authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm: kgsl: Fix race between timeline create/others and destroy ioctls



When creating a timeline allocate an ID but don't populate the slot
with the timeline pointer until we are done initializing the timeline.
This avoids a race if somebody tries to free the same identifier before
the create operation is complete. Also, correct kgsl_timeline_by_id
function by doing idr_find and refcount increase under same lock. This
eliminates the chance that a timeline will be destroyed while somebody
is still using it.

Change-Id: Id894baac1bbd6042f668ea4afca39fae3b5a2d86
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 4440785e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment