From 93fc09248a2fa8b840d8ce47800414980d74bdb0 Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Fri, 19 Feb 2021 17:36:44 -0800 Subject: 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 --- pkg/sentry/vfs/vfs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/sentry/vfs') 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 -- cgit v1.2.3