summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Yan Yan <evitayan@google.com> 2025-01-09 11:11:56 -0800
committer Yan Yan <evitayan@google.com> 2025-01-10 10:52:36 -0800
commitc7f12e1d10275c47b168fd27fec0746b9ef7c442 (patch)
tree3d39081f1269f261b4eaf3a4ececaf7c21efc100 /api/api.go
parent2468f8af91c1696e98d2cf46bf55433d143c6104 (diff)
Update VcnNetworkProvider to use thread safe Sets
This patch is to fix a race condition when two threads access VcnNetworkProvider.mRequests at the same time. The issue happened when the VCN thread is removing elements and the binder thread is iterating the Set. It causes the binder thread to end up with a Null element and throw NPE This patch fixes this threading issue by changing the Set to be a thread-safe Set Bug: 382106220 Test: atest CtsVcnTestCases && atest FrameworksVcnTests Test: Set up test environment to make the race condition 90% reproducible; verified the fix by running the test for 100 times on forrest Flag: EXEMPT; low risk and small scope bug fix Change-Id: Id7598a861368454efcd0aa49721c54e11aaebdf1
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions