msm: kgsl: Defer adding the mem entry to a process
If we add the mem entry pointer in the process idr and rb tree
too early, other threads can do operations on the entry by
guessing the ID or GPU address before the object gets returned
by the creating operation.
Allocate an ID for the object but don't assign the pointer until
right before the creating function returns ensuring that another
operation can't access it until it is ready.
Signed-off-by: Jordan Crouse <email@example.com>
Signed-off-by: Sunil Khatri <firstname.lastname@example.org>
Signed-off-by: Santhosh Punugu <email@example.com>
1 file changed