diff --git a/pkg/sentry/syscalls/linux/points.go b/pkg/sentry/syscalls/linux/points.go index f6587b211..3eefbb0d8 100644 --- a/pkg/sentry/syscalls/linux/points.go +++ b/pkg/sentry/syscalls/linux/points.go @@ -35,13 +35,16 @@ func newExitMaybe(info kernel.SyscallInfo) *pb.Exit { } func getFilePath(t *kernel.Task, fd int32) string { + if fd < 0 { + return "" + } fdt := t.FDTable() if fdt == nil { return "[err: no FD table]" } file, _ := fdt.GetVFS2(fd) if file == nil { - return "[err: requires VFS2]" + return "[err: FD not found]" } defer file.DecRef(t)