summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/sockfs
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-05-01 19:57:37 +0000
committergVisor bot <gvisor-bot@google.com>2020-05-01 19:57:37 +0000
commit60804f3bb0fdc597ea153ba6750553ea1b908104 (patch)
tree382149ca0e50c9880db4866dd3f046eaeca4a4f7 /pkg/sentry/fsimpl/sockfs
parentcbdef9bd094e532f3d97404e3d08f952d2dcb7c3 (diff)
parent82bae30ceea0984c94af3085866b58ec9e69ea67 (diff)
Merge release-20200422.0-9-g82bae30 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/sockfs')
-rwxr-xr-xpkg/sentry/fsimpl/sockfs/sockfs.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/sockfs/sockfs.go b/pkg/sentry/fsimpl/sockfs/sockfs.go
index 271134af8..dac2389fc 100755
--- a/pkg/sentry/fsimpl/sockfs/sockfs.go
+++ b/pkg/sentry/fsimpl/sockfs/sockfs.go
@@ -74,6 +74,11 @@ func (i *inode) Open(ctx context.Context, rp *vfs.ResolvingPath, vfsd *vfs.Dentr
}
// NewDentry constructs and returns a sockfs dentry.
+//
+// TODO(gvisor.dev/issue/1476): Currently, we are using
+// sockfs.filesystem.NextIno() to get inode numbers. We should use
+// device-specific numbers, so that we are not using the same generator for
+// netstack, unix, etc.
func NewDentry(creds *auth.Credentials, ino uint64) *vfs.Dentry {
// File mode matches net/socket.c:sock_alloc.
filemode := linux.FileMode(linux.S_IFSOCK | 0600)