Skip to content

Commit c458f2f

Browse files
committed
fix: eventfd leak for v2 runtime with v1 cgroups
There's no OOM monitoring for the v2 cgroups yet, so it seems unlikely that there was a leak in that case. Signed-off-by: Seth Pellegrino <[email protected]>
1 parent 258e10d commit c458f2f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

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)