소스 검색

Fix daemon panic on restoring containers

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Lei Jitang 9 년 전
부모
커밋
c75de8e33c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      libcontainerd/client_linux.go

+ 2 - 0
libcontainerd/client_linux.go

@@ -563,6 +563,8 @@ func (clnt *client) Restore(containerID string, options ...CreateOption) error {
 		clnt.remote.Lock()
 		return nil
 	}
+	// relock because of the defer
+	clnt.remote.Lock()
 
 	clnt.deleteContainer(containerID)