Update to runc v 1.0.3
fix GetStats for unsupported hugetlb needed to run on RaspberryPi4 with non-hugetlb compiled kernel (standard). This includes the https://github.com/opencontainers/runc/pull/3233 Used commands from hack folder to generate the new dependency: ``` hack/pin-dependency.sh github.com/opencontainers/runc v1.0.3 hack/update-vendor.sh hack/lint-dependencies.sh ```
This commit is contained in:
9
vendor/github.com/opencontainers/runc/libcontainer/message_linux.go
generated
vendored
9
vendor/github.com/opencontainers/runc/libcontainer/message_linux.go
generated
vendored
@@ -3,6 +3,9 @@
|
||||
package libcontainer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/vishvananda/netlink/nl"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
@@ -54,6 +57,12 @@ type Bytemsg struct {
|
||||
|
||||
func (msg *Bytemsg) Serialize() []byte {
|
||||
l := msg.Len()
|
||||
if l > math.MaxUint16 {
|
||||
// We cannot return nil nor an error here, so we panic with
|
||||
// a specific type instead, which is handled via recover in
|
||||
// bootstrapData.
|
||||
panic(netlinkError{fmt.Errorf("netlink: cannot serialize bytemsg of length %d (larger than UINT16_MAX)", l)})
|
||||
}
|
||||
buf := make([]byte, (l+unix.NLA_ALIGNTO-1) & ^(unix.NLA_ALIGNTO-1))
|
||||
native := nl.NativeEndian()
|
||||
native.PutUint16(buf[0:2], uint16(l))
|
||||
|
||||
Reference in New Issue
Block a user