summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/shm
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-07-12 15:24:04 -0700
committergVisor bot <gvisor-bot@google.com>2021-07-12 15:26:20 -0700
commite3fdd1593217894328d5a917bbc356d0a7d145f0 (patch)
tree1913cf79abb68fda218f249ffa32a7bf309330ac /pkg/sentry/kernel/shm
parentebe99977a47d93ee769121f9463650cfb924e243 (diff)
[syserror] Update syserror to linuxerr for more errors.
Update the following from syserror to the linuxerr equivalent: EEXIST EFAULT ENOTDIR ENOTTY EOPNOTSUPP ERANGE ESRCH PiperOrigin-RevId: 384329869
Diffstat (limited to 'pkg/sentry/kernel/shm')
-rw-r--r--pkg/sentry/kernel/shm/shm.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/kernel/shm/shm.go b/pkg/sentry/kernel/shm/shm.go
index 9c66b90ef..f7ac4c2b2 100644
--- a/pkg/sentry/kernel/shm/shm.go
+++ b/pkg/sentry/kernel/shm/shm.go
@@ -183,7 +183,7 @@ func (r *Registry) FindOrCreate(ctx context.Context, pid int32, key Key, size ui
// "IPC_CREAT and IPC_EXCL were specified in shmflg, but a
// shared memory segment already exists for key."
// - man shmget(2)
- return nil, syserror.EEXIST
+ return nil, linuxerr.EEXIST
}
shm.IncRef()
@@ -512,7 +512,7 @@ func (*Shm) CopyMapping(context.Context, memmap.MappingSpace, hostarch.AddrRange
func (s *Shm) Translate(ctx context.Context, required, optional memmap.MappableRange, at hostarch.AccessType) ([]memmap.Translation, error) {
var err error
if required.End > s.fr.Length() {
- err = &memmap.BusError{syserror.EFAULT}
+ err = &memmap.BusError{linuxerr.EFAULT}
}
if source := optional.Intersect(memmap.MappableRange{0, s.fr.Length()}); source.Length() != 0 {
return []memmap.Translation{