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:
Crt Mori
2021-12-09 14:27:53 +01:00
committed by Crt Mori
parent e3c83c6134
commit fadb36effb
9 changed files with 73 additions and 36 deletions

View File

@@ -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))