From 05223889bd74faf0f3967e58fa11e3bdf1a518d7 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Tue, 17 Nov 2020 19:00:36 -0800 Subject: fs/fuse: don't dereference fuse.DeviceFD.fs if it is nil PiperOrigin-RevId: 342992936 --- pkg/sentry/fsimpl/fuse/dev.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sentry/fsimpl/fuse/dev.go b/pkg/sentry/fsimpl/fuse/dev.go index 89c3ef079..1bbe6fdb7 100644 --- a/pkg/sentry/fsimpl/fuse/dev.go +++ b/pkg/sentry/fsimpl/fuse/dev.go @@ -363,7 +363,7 @@ func (fd *DeviceFD) Readiness(mask waiter.EventMask) waiter.EventMask { func (fd *DeviceFD) readinessLocked(mask waiter.EventMask) waiter.EventMask { var ready waiter.EventMask - if fd.fs.umounted { + if fd.fs == nil || fd.fs.umounted { ready |= waiter.EventErr return ready & mask } -- cgit v1.2.3