summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/fuse/request_response.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/request_response.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/request_response.go')
-rw-r--r--pkg/sentry/fsimpl/fuse/request_response.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/fuse/request_response.go b/pkg/sentry/fsimpl/fuse/request_response.go
index 7fa00569b..dc0180812 100644
--- a/pkg/sentry/fsimpl/fuse/request_response.go
+++ b/pkg/sentry/fsimpl/fuse/request_response.go
@@ -104,7 +104,7 @@ type Request struct {
}
// NewRequest creates a new request that can be sent to the FUSE server.
-func (conn *connection) NewRequest(creds *auth.Credentials, pid uint32, ino uint64, opcode linux.FUSEOpcode, payload marshal.Marshallable) (*Request, error) {
+func (conn *connection) NewRequest(creds *auth.Credentials, pid uint32, ino uint64, opcode linux.FUSEOpcode, payload marshal.Marshallable) *Request {
conn.fd.mu.Lock()
defer conn.fd.mu.Unlock()
conn.fd.nextOpID += linux.FUSEOpID(reqIDStep)
@@ -130,7 +130,7 @@ func (conn *connection) NewRequest(creds *auth.Credentials, pid uint32, ino uint
id: hdr.Unique,
hdr: &hdr,
data: buf,
- }, nil
+ }
}
// futureResponse represents an in-flight request, that may or may not have