smbfs: Prevent potential Chrome crash after resume from suspend
If a share fails to remount after suspend, a race condition can cause the SmbService's share map to be changed while it's being iterated over, ultimately resulting in Chrome crash due to invalid pointer dereference. Take a copy of the map's keys and iterate over them so that the map itself can be safely mutated during the resume process. Test: Run suspend_stress_test and ensure Chrome doesn't crash Test: unit_tests --gtest_filter="*SmbFs*" Bug: 1147299 Change-Id: I9b3982a381951b72f594fc2067992a8df9f9b204 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2559473Reviewed-by:Anand K Mistry <amistry@chromium.org> Commit-Queue: Josh Simmons <simmonsjosh@google.com> Cr-Commit-Position: refs/heads/master@{#830849}
Showing
Please register or sign in to comment