diff options
| author | 2022-03-23 14:27:45 +0800 | |
|---|---|---|
| committer | 2022-03-24 08:44:31 +0000 | |
| commit | 5df3f27df376bf275c50ac6ed8ac8c9251ab50c3 (patch) | |
| tree | 664b9fc1998d40761964437e44ebf22063476dba /tools/aapt2/ResourceTable.cpp | |
| parent | 2ea87d4d90186ba79c87877afb0927d19fb9ed5b (diff) | |
Drop task snapshot with invalid hw buffer
The notifyTaskSnapshotChanged may not be always called after
Binder.clearCallingIdentity. And because there was commit
67b0902 that avoids keeping unnecessary buffer in remote
processes, it may mis-close the buffer in system server if
the calling pid isn't cleared on binder thread.
e.g. there are several suspects from ActivityTaskManagerInternal
Though it might be the responsibility of the caller to clear
binder identity before calling internal interfaces.
Instead of adding clearCallingIdentity every where:
1. Explicitly set the listener as local to skip closing the buffer
so it is independent of which thread is calling.
2. Protect the persister when using the buffer.
Bug: 192143094
Bug: 220659717
Bug: 223950159
Bug: 225794452
Test: atest TaskSnapshotPersisterLoaderTest
Change-Id: I94e8e706e56a73fffe8189023bcef5efd797a24c
Diffstat (limited to 'tools/aapt2/ResourceTable.cpp')
0 files changed, 0 insertions, 0 deletions