diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-12-11 12:28:33 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-11 12:28:33 +0000 |
commit | 29acd2ab481e386db3dff7de135432afcaacd7a9 (patch) | |
tree | 393a35362d33080112958407561eeb462e75c163 /pkg/sentry/syscalls | |
parent | 9b65ed17ec2728d8ac3b362fca44825d8be08659 (diff) | |
parent | 73eccab91ec58aafd1ffdf038993b78a812ba30f (diff) |
Merge release-20201208.0-26-g73eccab91 (automated)
Diffstat (limited to 'pkg/sentry/syscalls')
-rw-r--r-- | pkg/sentry/syscalls/linux/sys_sem.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_sem.go b/pkg/sentry/syscalls/linux/sys_sem.go index a1601676f..a62a6b3b5 100644 --- a/pkg/sentry/syscalls/linux/sys_sem.go +++ b/pkg/sentry/syscalls/linux/sys_sem.go @@ -150,9 +150,10 @@ func Semctl(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscal buf := args[3].Pointer() r := t.IPCNamespace().SemaphoreRegistry() info := r.IPCInfo() - _, err := info.CopyOut(t, buf) - // TODO(gvisor.dev/issue/137): Return the index of the highest used entry. - return 0, nil, err + if _, err := info.CopyOut(t, buf); err != nil { + return 0, nil, err + } + return uintptr(r.HighestIndex()), nil, nil case linux.SEM_INFO, linux.SEM_STAT, |