Fix race between Apply and GetStats
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
8f7d5fe376
commit
e5906f7ed5
|
@ -130,6 +130,8 @@ func (m *Manager) Apply(pid int) (err error) {
|
|||
return cgroups.EnterPid(m.Paths, pid)
|
||||
}
|
||||
|
||||
m.mu.Lock()
|
||||
defer m.mu.Unlock()
|
||||
paths := make(map[string]string)
|
||||
for _, sys := range subsystems {
|
||||
if err := sys.Apply(d); err != nil {
|
||||
|
|
Loading…
Reference in New Issue