diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-10-27 16:09:40 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-10-28 01:03:23 +0000 |
commit | 368c40116434532dc0b53b72fa04788ca6742898 (patch) | |
tree | d3a6b5bc4816eb17ed181df850f1671d8629fffb /src/runtime/os_plan9.go | |
parent | 94f3762462a999bfc5491c8d1b892110651e23d6 (diff) | |
download | go-368c40116434532dc0b53b72fa04788ca6742898.tar.gz go-368c40116434532dc0b53b72fa04788ca6742898.zip |
runtime: block signals in needm before allocating M
Otherwise, if a signal occurs just after we allocated the M,
we can deadlock if the signal handler needs to allocate an M
itself.
Fixes #42207
Change-Id: I76f44547f419e8b1c14cbf49bf602c6e645d8c14
Reviewed-on: https://go-review.googlesource.com/c/go/+/265759
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/runtime/os_plan9.go')
-rw-r--r-- | src/runtime/os_plan9.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/os_plan9.go b/src/runtime/os_plan9.go index f3037a7508..62aecea060 100644 --- a/src/runtime/os_plan9.go +++ b/src/runtime/os_plan9.go @@ -184,7 +184,7 @@ func mpreinit(mp *m) { mp.errstr = (*byte)(mallocgc(_ERRMAX, nil, true)) } -func msigsave(mp *m) { +func sigsave(p *sigset) { } func msigrestore(sigmask sigset) { |