diff options
author | Andrei Vagin <avagin@google.com> | 2020-11-17 19:00:36 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-17 19:02:52 -0800 |
commit | 05223889bd74faf0f3967e58fa11e3bdf1a518d7 (patch) | |
tree | e18807a8d51c5b7a3cc9482c2bbc27f0334212b5 /pkg/sentry/fsimpl | |
parent | 949742be882149a42fcb26807bc78a6ec135bdb2 (diff) |
fs/fuse: don't dereference fuse.DeviceFD.fs if it is nil
PiperOrigin-RevId: 342992936
Diffstat (limited to 'pkg/sentry/fsimpl')
-rw-r--r-- | pkg/sentry/fsimpl/fuse/dev.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |