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

Skip to content
Commit 11abd636 authored by Achim Thesmann's avatar Achim Thesmann
Browse files

Prevent race condition

There is a chance that the service record loses its ability to start background activities (BAL) between the evaluation of the if condition and computing the token used to update the process record. This results in system server crashing for a failed precondition (expecting BAL allowed, but actually forbidden by the passed in privileges).

With the change there is almost no penalty in calculating the token
every time (it might actually be faster as we can now skip evaluating
the logic a second time) and it is guaranteed to be consistent.
Since the logic is otherwise not changes there is no risk in doing this
change.

Test: atest BackgroundActivityLaunchTest
Bug: 285979934
Change-Id: Ia480ef68dfaf34dccea6f24cf34ced15e1434cc3
parent fa05c1b9
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