diff options
author | Fabricio Voznika <fvoznika@google.com> | 2020-03-18 15:12:11 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-18 15:13:42 -0700 |
commit | f1d1af2a4ad35dd20a7c56bd9e842e347b126c31 (patch) | |
tree | 49efaa0baa28ea16cf5dc089f5ffb60301399c8f /pkg | |
parent | fc16e64396cf534bc4336e6bc0396a2f0f621e70 (diff) |
Fix FDTable.NewFDVFS2
It was looking at VFS1 table to determine where to
allocate the next FD from.
Updates #1035
PiperOrigin-RevId: 301678858
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/sentry/kernel/fd_table.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/fd_table.go b/pkg/sentry/kernel/fd_table.go index dddc28d5a..d09d97825 100644 --- a/pkg/sentry/kernel/fd_table.go +++ b/pkg/sentry/kernel/fd_table.go @@ -338,7 +338,7 @@ func (f *FDTable) NewFDVFS2(ctx context.Context, minfd int32, file *vfs.FileDesc fd = f.next } for fd < end { - if d, _, _ := f.get(fd); d == nil { + if d, _, _ := f.getVFS2(fd); d == nil { f.setVFS2(fd, file, flags) if fd == f.next { // Update next search start position. |