Use overlay MountSource when binding socket in overlay.

PiperOrigin-RevId: 280131840
This commit is contained in:
Nicolas Lacasse 2019-11-12 22:49:22 -08:00 committed by gVisor bot
parent 2c6c9af904
commit c2d3dc0c13
1 changed files with 3 additions and 1 deletions

View File

@ -462,7 +462,9 @@ func overlayBind(ctx context.Context, o *overlayEntry, parent *Dirent, name stri
inode.DecRef() inode.DecRef()
return nil, err return nil, err
} }
return NewDirent(ctx, newOverlayInode(ctx, entry, inode.MountSource), name), nil // Use the parent's MountSource, since that corresponds to the overlay,
// and not the upper filesystem.
return NewDirent(ctx, newOverlayInode(ctx, entry, parent.Inode.MountSource), name), nil
} }
func overlayBoundEndpoint(o *overlayEntry, path string) transport.BoundEndpoint { func overlayBoundEndpoint(o *overlayEntry, path string) transport.BoundEndpoint {