diff options
| author | BurtonQin <bobbqqin@gmail.com> | 2020-04-21 11:37:41 +0000 |
|---|---|---|
| committer | Jay Conrod <jayconrod@google.com> | 2020-04-21 15:37:29 +0000 |
| commit | 4f27e1d7aadba639cceaa93f77ec0c7ee3fee01b (patch) | |
| tree | c60ce02dfab9a58d3b22e3cac24dee105cd0b8ec /src/cmd/compile/internal/syntax/parser.go | |
| parent | af55060b39d2f6f39711abc95a23bd8f47968e8e (diff) | |
| download | go-4f27e1d7aadba639cceaa93f77ec0c7ee3fee01b.tar.xz | |
cmd/go/internal/modfetch: add Unlock before return in checkModSum
In cmd/go/internal/modfetch/fetch.go,
`checkModSum()` forgets Unlock before return, which may lead to deadlock.
https://github.com/golang/go/blob/876c1feb7d5e10a6ff831de9db19b9ff0ea92fa8/src/cmd/go/internal/modfetch/fetch.go#L514-L520
The fix is to add `goSum.mu.Unlock()` before return.
Change-Id: I855b1c1bc00aeada2c1e84aabb5328f02823007d
GitHub-Last-Rev: afeb3763dd1d08c4c15c4c4183fd5705da60dc4c
GitHub-Pull-Request: golang/go#38563
Reviewed-on: https://go-review.googlesource.com/c/go/+/229219
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/compile/internal/syntax/parser.go')
0 files changed, 0 insertions, 0 deletions
