Skip to content
Commit 83f4c75f authored by Tim Murray's avatar Tim Murray
Browse files

CachedAppOptimizer: update pending freeze inside the process lock

Only update pending freeze once mProcLock has been acquired. If this
doesn't happen, the following is possible:

1. FreezeHandler calls setPendingFreeze(false)
2. FreezeHandler blocks on mProcLock, held by someone
3. BroadcastQueue calls notifyStartedRunning
4. BroadcastQueue calls unfreezeTemporarily, which grabs mProcLock
5. BQ wins mProcLock race and sees opt.isPendingFreeze == false
and opt.isFrozen == false so skips unfreeze
6. FreezeHandler wakes up, grabs mProcLock, and freezes the process

Test: boots
Bug: 267949291
Change-Id: I52ab99f3b838e86d187a5a2a27652f78896ffaa4
parent ee1c8091
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