summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/vfs/mount.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/mount.go b/pkg/sentry/vfs/mount.go
index d865fd603..7063066ff 100644
--- a/pkg/sentry/vfs/mount.go
+++ b/pkg/sentry/vfs/mount.go
@@ -309,6 +309,11 @@ func (vfs *VirtualFilesystem) UmountAt(ctx context.Context, creds *auth.Credenti
vfs.mountMu.Unlock()
return syserror.EINVAL
}
+
+ if vd.mount == vd.mount.ns.root {
+ vfs.mountMu.Unlock()
+ return syserror.EINVAL
+ }
}
// TODO(gvisor.dev/issue/1035): Linux special-cases umount of the caller's