e2cfb7ac98bb8942decbbb162e74c340886d1381
GetTasks can call GetService and GetNode with the read lock held. These methods try to aquire the read side of the same lock. According to the sync package documentation, this is not safe: > If a goroutine holds a RWMutex for reading, it must not expect this or > any other goroutine to be able to also take the read lock until the > first read lock is released. In particular, this prohibits recursive > read locking. This is to ensure that the lock eventually becomes > available; a blocked Lock call excludes new readers from acquiring the > lock. Fix GetTasks to use the lower-level getService and getNode methods instead. Also, use lockedManagerAction to simplify GetTasks. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com> Upstream-commit: bd4f66c8f1f6ad4a2f228a957f293bc157e13d9c Component: engine
Description
No description provided
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%