Please sign in to comment.
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 with 12 additions and 3 deletions.