]> Cypherpunks repositories - gostls13.git/commit
runtime: iterate ms via allm linked list to avoid race
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 2 Oct 2019 08:05:46 +0000 (10:05 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 3 Oct 2019 15:55:39 +0000 (15:55 +0000)
commit6b85fa80519615ae5fd58154277b47d77e5cf08b
tree100b95a177ee2a29ee04fa1a8a2822ad313ac6fb
parent9e6a84f2b126cfe15eaa57b86b0d074a018dbef4
runtime: iterate ms via allm linked list to avoid race

It's pointless to reach all ms via allgs, and doing so introduces a
race, since the m member of a g can change underneath it. Instead
iterate directly through the allm linked list.

Updates: #31528
Updates: #34130

Change-Id: I34b88402b44339b0a5b4cd76eafd0ce6e43e2be1
Reviewed-on: https://go-review.googlesource.com/c/go/+/198417
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/os_windows.go