diff options
| author | Michael Pratt <mpratt@google.com> | 2023-09-08 17:59:02 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-09-11 16:15:14 +0000 |
| commit | 298e8488646e25e62b3879b88958cf0672b5acac (patch) | |
| tree | 6b0b3e10e2a645cdad72019a96942ac592cce79b /src/runtime | |
| parent | 972fc055eb43bfe0e777f0301739b95c2053c208 (diff) | |
| download | go-298e8488646e25e62b3879b88958cf0672b5acac.tar.xz | |
runtime: don't clear procid on netbsd
This is a partial revert of CL 526118.
NetBSD uses mp.procid in locking (semawake). unminit is called
surprisingly early in mexit, and there is definitely locking after that
point, so it isn't safe to clear procid so early.
Fixes #62524.
Fixes #62531.
Change-Id: Iefbef63e84fc0395e255970a301401e1187a910d
Reviewed-on: https://go-review.googlesource.com/c/go/+/527057
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/os_netbsd.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/os_netbsd.go b/src/runtime/os_netbsd.go index c5d7b4b978..7cbba48194 100644 --- a/src/runtime/os_netbsd.go +++ b/src/runtime/os_netbsd.go @@ -316,7 +316,8 @@ func minit() { //go:nosplit func unminit() { unminitSignals() - getg().m.procid = 0 + // Don't clear procid, it is used by locking (semawake), and locking + // must continue working after unminit. } // Called from exitm, but not from drop, to undo the effect of thread-owned |
