runtime: lock mtxpoll in AIX netpollBreak

netpollBreak calls netpollwakeup, and netpollwakeup expects the mtxpoll
lock to be held, so that it has exclusive access to pendingUpdates.
Not acquiring the lock was a mistake in CL 171824. Fortunately it
rarely matters in practice.

Change-Id: I32962ec2575c846ef3d6a91a4d821b2ff02d983c
Reviewed-on: https://go-review.googlesource.com/c/go/+/225618
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
Ian Lance Taylor 2020-03-26 09:13:11 -07:00
parent f5558bb2f5
commit 78a45d8b45

View File

@ -130,7 +130,9 @@ func netpollarm(pd *pollDesc, mode int) {
// netpollBreak interrupts a poll.
func netpollBreak() {
lock(&mtxpoll)
netpollwakeup()
unlock(&mtxpoll)
}
// netpoll checks for ready network connections.