cgroupfs: do not return errors from strconv.ParseInt() to write()

Arbitrary errors are not convertible to errnos for syscall return and cause the
sentry to panic.

PiperOrigin-RevId: 564782206
This commit is contained in:
Jamie Liu
2023-09-12 11:29:05 -07:00
committed by gVisor bot
parent 6d06f309ed
commit 1910a4577f
+1 -1
View File
@@ -366,7 +366,7 @@ func toDeviceNumber(s string) (int64, error) {
}
val, err := strconv.ParseInt(s, 10, 64)
if err != nil {
return 0, err
return 0, linuxerr.EINVAL
}
return val, nil
}