summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/control/BUILD
diff options
context:
space:
mode:
authorJielong Zhou <jielong.zjl@antfin.com>2021-08-09 20:01:05 +0800
committerJielong Zhou <jielong.zjl@antfin.com>2021-08-09 20:07:58 +0800
commit57da3c7ddd50f9a909d9b0022fe63eb201a2ca0e (patch)
tree9a737ecb4f8d84eb2f58624f58d2ac93de46555d /pkg/sentry/control/BUILD
parentc07dc3828a0330a3804514094d45e6362ae2de30 (diff)
vfs2/epoll: fix missing event trigger in epoll-in-epoll case
In some cases, epoll fd would be registered in another epoll fd. Process may call epoll_wait on the upper layer epoll fd, and the lower layer epoll fd should generate EPOLLIN event if itself get any event. But in VFS2, events generated for epoll fd could only be cleaned when (*EpollInstance).ReadEvents is called. And this function is only called when epoll_wait on the epoll fd. Therefore, when epoll_wait on the upper layer epoll fd, the events generated in lower layer epoll fd would not be cleaned even if it's not valid anymore, and lower layer epoll fd would not report event to upper layer even if new event is triggered. In this commit, (*EpollInstance).Readiness would also clean invalid events. So, when epoll_wait on the upper layer epoll fd, Readiness function called on lower layer epoll fd would clean invalid events. And lower layer could report event to upper layer if new event is triggered. A syscall test case is added to verify the commit. Fixes https://github.com/google/gvisor/issues/6427 Signed-off-by: Jielong Zhou <jielong.zjl@antgroup.com>
Diffstat (limited to 'pkg/sentry/control/BUILD')
0 files changed, 0 insertions, 0 deletions