diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-25 21:40:09 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-25 21:40:09 +0000 |
commit | ed9085d4e5d4944ab662a58ee3a33d3b5210bd3e (patch) | |
tree | ae6b893d1b673b9020cf1cf3d66c5071e492d7fb /pkg/sentry/vfs/epoll.go | |
parent | a59ee560978159013ade1bfb878d39cf9c551476 (diff) | |
parent | 471b15b212831af31c2fe36cd42cea7ec7b7785b (diff) |
Merge release-20200219.0-37-g471b15b (automated)
Diffstat (limited to 'pkg/sentry/vfs/epoll.go')
-rwxr-xr-x | pkg/sentry/vfs/epoll.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/epoll.go b/pkg/sentry/vfs/epoll.go index eed41139b..3da45d744 100755 --- a/pkg/sentry/vfs/epoll.go +++ b/pkg/sentry/vfs/epoll.go @@ -202,6 +202,9 @@ func (ep *EpollInstance) AddInterest(file *FileDescription, num int32, event lin // Add epi to file.epolls so that it is removed when the last // FileDescription reference is dropped. file.epollMu.Lock() + if file.epolls == nil { + file.epolls = make(map[*epollInterest]struct{}) + } file.epolls[epi] = struct{}{} file.epollMu.Unlock() |