]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] runtime: drop SIGPROF while in ARM < 7 kernel helpers
authorMichael Pratt <mpratt@google.com>
Thu, 12 Aug 2021 21:17:51 +0000 (17:17 -0400)
committerDmitri Shuralyov <dmitshur@golang.org>
Fri, 13 Aug 2021 16:34:25 +0000 (16:34 +0000)
commitf7b9470992bfae96fe61d45bec40b7fc282f15f0
treeca4af77b0e73ccab86b7ac79e16b9537bc1f088a
parent4397d66bdd98a243f0e1a501d92bc9484660ec41
[release-branch.go1.17] runtime: drop SIGPROF while in ARM < 7 kernel helpers

On Linux ARMv6 and below runtime/internal/atomic.Cas calls into a kernel
cas helper at a fixed address. If a SIGPROF arrives while executing the
kernel helper, the sigprof lostAtomic logic will miss that we are
potentially in the spinlock critical section, which could cause
a deadlock when using atomics later in sigprof.

For #47505
Fixes #47688

Change-Id: If8ba0d0fc47e45d4e6c68eca98fac4c6ed4e43c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/341889
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
(cherry picked from commit 20a620fd9f7bc35739c1af3602d53808d0430814)
Reviewed-on: https://go-review.googlesource.com/c/go/+/341890
src/runtime/proc.go