summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-06-10 09:43:46 +0000
committergVisor bot <gvisor-bot@google.com>2021-06-10 09:43:46 +0000
commitabed509b6132c94fb377eebb4660e34ba9401ed2 (patch)
treef3e58f49e58ed73f6af02c5d6ad2153d88fe0c79
parent0eba475c75871c21aac849203c3f344dc84f5790 (diff)
parentc867c5526d4b25e8f01e0d6a6e81974676957c97 (diff)
Merge release-20210601.0-37-gc867c5526 (automated)
-rw-r--r--pkg/sentry/kernel/semaphore/semaphore.go4
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.