diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-06-10 02:39:40 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-10 02:39:40 -0700 |
commit | c867c5526d4b25e8f01e0d6a6e81974676957c97 (patch) | |
tree | 010e99c7d1c98538b84b38ab797b4191e29c14f6 /pkg/sentry/kernel/semaphore | |
parent | a51fcf22ebe522c028e99692bbedf04daf0436cc (diff) | |
parent | 69e3476ad5247a11f4b93e29607bb7c1513d3cc4 (diff) |
Merge pull request #6103 from sudo-sturbia:semaphore-err
PiperOrigin-RevId: 378607458
Diffstat (limited to 'pkg/sentry/kernel/semaphore')
-rw-r--r-- | pkg/sentry/kernel/semaphore/semaphore.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/kernel/semaphore/semaphore.go b/pkg/sentry/kernel/semaphore/semaphore.go index 1d9edf118..47bb66b42 100644 --- a/pkg/sentry/kernel/semaphore/semaphore.go +++ b/pkg/sentry/kernel/semaphore/semaphore.go @@ -171,10 +171,10 @@ func (r *Registry) FindOrCreate(ctx context.Context, key, nsems int32, mode linu // Map semaphores and map indexes in a registry are of the same size, // check map semaphores only here for the system limit. if len(r.semaphores) >= setsMax { - return nil, syserror.EINVAL + return nil, syserror.ENOSPC } if r.totalSems() > int(semsTotalMax-nsems) { - return nil, syserror.EINVAL + return nil, syserror.ENOSPC } // Finally create a new set. |