summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2020-01-23 16:17:50 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-23 16:19:10 -0800
commit3db317390b5cc491d680fc4a5fc7b8372890b4da (patch)
tree711ad8b75285e9733cb4df92b7cad4861b731020 /pkg
parent3d10edc9423789342047f8fcf3b6054bb71ea392 (diff)
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
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/kernel/epoll/epoll.go1
1 files changed, 1 insertions, 0 deletions
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.