Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MultiAddressSpaceLocker::AddAreaCacheAndLock(): race condition
* Add a VMArea* version of AddArea(). * AddAreaCacheAndLock(): Use the new AddArea() version. This not only saves the ID hash table lookup, but also fixes a race condition with delete_area(). delete_area() removes the area from the hash before removing it from its cache, so iterating through the cache's areas can turn up an area that no longer is in the hash. In that case we would fail immediately. The new AddArea() won't fail in this situation, though. Fixes #9686: vm_copy_area() could fail for the "commpage" area. That's an area all teams share, so any team terminating while another one was fork()ing could trigger it.
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 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