diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-10-29 21:07:05 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-29 21:07:05 +0000 |
commit | 806fa5c3235c08334de306eb5a5a40a51ee61c9f (patch) | |
tree | 1a357aa5ffff62553adb164e8c3ec57eea3e1460 /pkg/sentry | |
parent | 9c247a0b6254bedf6231a3bda77b7476e13a6ff2 (diff) | |
parent | b822923b706d6d2c5206451040f51a8c2f961353 (diff) |
Merge release-20211019.0-53-gb822923b7 (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/kernel/task_syscall.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/kernel/task_syscall.go b/pkg/sentry/kernel/task_syscall.go index 2b1d7e114..2b85fe1ca 100644 --- a/pkg/sentry/kernel/task_syscall.go +++ b/pkg/sentry/kernel/task_syscall.go @@ -381,7 +381,7 @@ func ExtractErrno(err error, sysno int) int { case unix.Errno: return int(err) case *errors.Error: - return int(err.Errno()) + return int(linuxerr.ToUnix(err)) case *memmap.BusError: // Bus errors may generate SIGBUS, but for syscalls they still // return EFAULT. See case in task_run.go where the fault is @@ -395,7 +395,7 @@ func ExtractErrno(err error, sysno int) int { return ExtractErrno(err.Err, sysno) default: if errno, ok := linuxerr.TranslateError(err); ok { - return int(errno.Errno()) + return int(linuxerr.ToUnix(errno)) } } panic(fmt.Sprintf("Unknown syscall %d error: %v", sysno, err)) |