summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorLee Shombert <shombert@google.com>2021-01-17 07:56:24 -0800
committerLee Shombert <shombert@google.com>2021-01-19 10:03:03 -0800
commit74008c840594b75c26749aeb35d38a494837c963 (patch)
tree0215e18540d29390c9f0b722beaa02716434cf75 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent3b82486cb14f178f0f951f67acbf40f9ec47d55e (diff)
Fix race condition in PM snapshots
Bug: 177499032 Fix a race condition in snapshot generation. The root cause is that the "invalid" flag and the current snapshot are not read atomically. Therefore, the invalid flag that is read might not apply to the snapshot being held by thread. Three things are fixed in this change: 1. If the current thread already holds mLock then the live computer is used even if the snapshot computer was requested. See the bug for a description of why this works and why it is important even without items 2 and 3. 2. Otherwise, the snapshot lock it taken to decide if the current snapshot can be reused or if it must be rebuilt. 3. Two formatting/editorial nits are fixed. Test: atest * FrameworksServicesTests:UserSystemPackageInstallerTest * FrameworksServicesTests:PackageManagerSettingsTests * FrameworksServicesTests:PackageManagerServiceTest * FrameworksServicesTests:AppsFilterTest * FrameworksServicesTests:PackageInstallerSessionTest * FrameworksServicesTests:ScanTests * UserLifecycleTests#startUser * UserLifecycleTests#stopUser * UserLifecycleTests#switchUser Change-Id: I67dfcfde87e2b4cbc74b66a7d2921e602883be83
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions