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>
diff --git a/src/runtime/netpoll_aix.go b/src/runtime/netpoll_aix.go
index c936fbb7..61becc2 100644
--- a/src/runtime/netpoll_aix.go
+++ b/src/runtime/netpoll_aix.go
@@ -130,7 +130,9 @@
// netpollBreak interrupts a poll.
func netpollBreak() {
+ lock(&mtxpoll)
netpollwakeup()
+ unlock(&mtxpoll)
}
// netpoll checks for ready network connections.