summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-02-11 00:37:14 +0000
committergVisor bot <gvisor-bot@google.com>2021-02-11 00:37:14 +0000
commitf43172c57bb01219449d807c2bcb7abba4d51ac4 (patch)
treef5e0aa281ce2e21c8e818289ae751d366234c34b /pkg/sentry/vfs
parent9f5989402eea9549955a2682cffc87e6f5923c4e (diff)
parent97a36d1696982949722c6d6da1e5031d79e90b48 (diff)
Merge release-20210201.0-82-g97a36d169 (automated)
Diffstat (limited to 'pkg/sentry/vfs')
-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