]> Cypherpunks repositories - gostls13.git/commit
runtime: allow proflock and mheap.speciallock above globalAlloc.mutex
authorMichael Pratt <mpratt@google.com>
Fri, 17 Apr 2020 19:36:13 +0000 (15:36 -0400)
committerMichael Pratt <mpratt@google.com>
Tue, 21 Apr 2020 20:22:06 +0000 (20:22 +0000)
commit300ff5d8ac12a5515234e68aa8a03637ba181937
treec7193db3b4ce186ef559db21cf624a330909d4ed
parente464d7d7970be972a17a98c7ad996c2db4a04997
runtime: allow proflock and mheap.speciallock above globalAlloc.mutex

During schedinit, these may occur in:

mProf_Malloc
  stkbucket
    newBucket
      persistentalloc
        persistentalloc1

mProf_Malloc
  setprofilebucket
    fixalloc.alloc
      persistentalloc
        persistentalloc1

These seem to be legitimate lock orderings.

Additionally, mheap.speciallock had a defined rank, but it was never
actually used. That is fixed now.

Updates #38474

Change-Id: I0f6e981852eac66dafb72159f426476509620a65
Reviewed-on: https://go-review.googlesource.com/c/go/+/228786
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/runtime/lockrank.go
src/runtime/mheap.go