Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions rlimit/rlimit_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ func detectMemcgAccounting() error {
return fmt.Errorf("getting original memlock rlimit: %s", err)
}

// If the soft limit is already infinite there is nothing for RemoveMemlock
// to do.
if oldLimit.Cur == unix.RLIM_INFINITY {
return nil
}

// Drop the current limit to zero, maintaining the old Max value.
// This is always permitted by the kernel for unprivileged users.
// Retrieve a new copy of the old limit tuple to minimize the chances
Expand Down
Loading