summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2021-02-19 17:36:44 -0800
committergVisor bot <gvisor-bot@google.com>2021-02-19 17:38:51 -0800
commit93fc09248a2fa8b840d8ce47800414980d74bdb0 (patch)
tree6006fc6b336315a4ae272782b8afb5c1130a9b2b /pkg/sentry/vfs
parent7544eeb242d0aba2da054a1663e043feaedb9618 (diff)
Don't hold baseEndpoint.mu while calling EventUpdate().
This removes a three-lock deadlock between fdnotifier.notifier.mu, epoll.EventPoll.listsMu, and baseEndpoint.mu. A lock order comment was added to epoll/epoll.go. Also fix unsafe access of baseEndpoint.connected/receiver. PiperOrigin-RevId: 358515191
Diffstat (limited to 'pkg/sentry/vfs')
-rw-r--r--pkg/sentry/vfs/vfs.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/vfs/vfs.go b/pkg/sentry/vfs/vfs.go
index b0e13cdab..00f1847d8 100644
--- a/pkg/sentry/vfs/vfs.go
+++ b/pkg/sentry/vfs/vfs.go
@@ -23,7 +23,9 @@
// Dentry.mu
// Locks acquired by FilesystemImpls between Prepare{Delete,Rename}Dentry and Commit{Delete,Rename*}Dentry
// VirtualFilesystem.filesystemsMu
-// EpollInstance.mu
+// fdnotifier.notifier.mu
+// EpollInstance.mu
+// Locks acquired by FileDescriptionImpl.Readiness
// Inotify.mu
// Watches.mu
// Inotify.evMu