Skip to content

Commit 92dc96a

Browse files
authored
Merge pull request #3961 from sethp-nr/fix/eventfd-leak-1.3-backport
[release/1.3 backport] eventfd leak
2 parents eb5e164 + 03ee836 commit 92dc96a

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

runtime/v2/runc/v1/service.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI.
271271
s.eventSendMu.Unlock()
272272
return nil, errdefs.ToGRPC(err)
273273
}
274-
if err := s.ep.Add(container.ID, container.Cgroup()); err != nil {
275-
logrus.WithError(err).Error("add cg to OOM monitor")
276-
}
277274
switch r.ExecID {
278275
case "":
276+
if err := s.ep.Add(container.ID, container.Cgroup()); err != nil {
277+
logrus.WithError(err).Error("add cg to OOM monitor")
278+
}
279279
s.send(&eventstypes.TaskStart{
280280
ContainerID: container.ID,
281281
Pid: uint32(p.Pid()),

runtime/v2/runc/v2/service.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,12 @@ func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI.
316316
s.eventSendMu.Unlock()
317317
return nil, errdefs.ToGRPC(err)
318318
}
319-
if err := s.ep.Add(container.ID, container.Cgroup()); err != nil {
320-
logrus.WithError(err).Error("add cg to OOM monitor")
321-
}
322319
switch r.ExecID {
323320
case "":
321+
if err := s.ep.Add(container.ID, container.Cgroup()); err != nil {
322+
logrus.WithError(err).Error("add cg to OOM monitor")
323+
}
324+
324325
s.send(&eventstypes.TaskStart{
325326
ContainerID: container.ID,
326327
Pid: uint32(p.Pid()),

0 commit comments

Comments
 (0)