forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition in PassthroughProgramCache.
PassthroughProgramCache has code to deal with multiple threads, but BlobCacheGet() does not hold the lock for the entire time it is called. This means it's possible for BlobCacheGet() to attempt to use a cache value that was deleted by another thread. BlobCacheGet() needs to hold the lock for the entirety of the function. Add a new PassthroughProgramCache::GetSize() method to handle the locking since BlobCacheGet() is a static method which can not hold lock. Bug: 1464739 Change-Id: Ibdbc78823fbf0032b8f0d84f0aafa249f93bf3d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4683916 Commit-Queue: Kenneth Russell <kbr@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: vikas soni <vikassoni@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Auto-Submit: vikas soni <vikassoni@chromium.org> Cr-Commit-Position: refs/heads/main@{#1170276}
- Loading branch information
1 parent
a77d713
commit 252897c
Showing
2 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters