summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/fuse/file.go
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2020-12-07 17:58:56 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-07 18:00:54 -0800
commit9c198e5df4216feb5ebbf144e3b616888dfe3c27 (patch)
tree2ac3ae16dbb8d79109deaf2b6a821990e09f1863 /pkg/sentry/fsimpl/fuse/file.go
parent1aeca3bfb7dc4253126eef3cc2fc765d372b2fea (diff)
Fix error handling on fusefs mount.
Don't propagate arbitrary golang errors up from fusefs because errors that don't map to an errno result in a sentry panic. Reported-by: syzbot+697cb635346e456fddfc@syzkaller.appspotmail.com PiperOrigin-RevId: 346220306
Diffstat (limited to 'pkg/sentry/fsimpl/fuse/file.go')
-rw-r--r--pkg/sentry/fsimpl/fuse/file.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/sentry/fsimpl/fuse/file.go b/pkg/sentry/fsimpl/fuse/file.go
index 83f2816b7..e138b11f8 100644
--- a/pkg/sentry/fsimpl/fuse/file.go
+++ b/pkg/sentry/fsimpl/fuse/file.go
@@ -83,12 +83,8 @@ func (fd *fileDescription) Release(ctx context.Context) {
opcode = linux.FUSE_RELEASE
}
kernelTask := kernel.TaskFromContext(ctx)
- // ignoring errors and FUSE server reply is analogous to Linux's behavior.
- req, err := conn.NewRequest(auth.CredentialsFromContext(ctx), uint32(kernelTask.ThreadID()), fd.inode().nodeID, opcode, &in)
- if err != nil {
- // No way to invoke Call() with an errored request.
- return
- }
+ // Ignoring errors and FUSE server reply is analogous to Linux's behavior.
+ req := conn.NewRequest(auth.CredentialsFromContext(ctx), uint32(kernelTask.ThreadID()), fd.inode().nodeID, opcode, &in)
// The reply will be ignored since no callback is defined in asyncCallBack().
conn.CallAsync(kernelTask, req)
}