From 3db317390b5cc491d680fc4a5fc7b8372890b4da Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Thu, 23 Jan 2020 16:17:50 -0800 Subject: Remove epoll entry from map when dropping it. This pattern (delete from map when dropping) is also used in epoll.RemoveEntry, and seems like generally a good idea. PiperOrigin-RevId: 291268208 --- pkg/sentry/kernel/epoll/epoll.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg') diff --git a/pkg/sentry/kernel/epoll/epoll.go b/pkg/sentry/kernel/epoll/epoll.go index 430311cc0..e84742993 100644 --- a/pkg/sentry/kernel/epoll/epoll.go +++ b/pkg/sentry/kernel/epoll/epoll.go @@ -174,6 +174,7 @@ func (e *EventPoll) Release() { entry.id.File.EventUnregister(&entry.waiter) entry.file.Drop() } + e.files = nil } // Read implements fs.FileOperations.Read. -- cgit v1.2.3