mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Don't eat error from epoll_ctl EPOLL_CTL_ADD
Docker maps stdin to `/dev/null` which doesn't support epoll. Host FD was ignoring the error and suceeding the epoll_ctl call from the container, giving false impressing that epoll would be notified. This required plumbing failure to all waiter.Waitable.EventRegister callers and implementers. Closes #6795 PiperOrigin-RevId: 414797621
This commit is contained in:
committed by
gVisor bot
parent
d62190f8b5
commit
9768009a79
@@ -3393,4 +3393,10 @@ func (s *socketOpsCommon) Type() (family int, skType linux.SockType, protocol in
|
||||
return s.family, s.skType, s.protocol
|
||||
}
|
||||
|
||||
// EventRegister implements waiter.Waitable.
|
||||
func (s *socketOpsCommon) EventRegister(e *waiter.Entry) error {
|
||||
s.Queue.EventRegister(e)
|
||||
return nil
|
||||
}
|
||||
|
||||
// LINT.ThenChange(./netstack_vfs2.go)
|
||||
|
||||
@@ -90,8 +90,9 @@ func (s *SocketVFS2) Readiness(mask waiter.EventMask) waiter.EventMask {
|
||||
}
|
||||
|
||||
// EventRegister implements waiter.Waitable.EventRegister.
|
||||
func (s *SocketVFS2) EventRegister(e *waiter.Entry) {
|
||||
func (s *SocketVFS2) EventRegister(e *waiter.Entry) error {
|
||||
s.socketOpsCommon.EventRegister(e)
|
||||
return nil
|
||||
}
|
||||
|
||||
// EventUnregister implements waiter.Waitable.EventUnregister.
|
||||
|
||||
Reference in New Issue
Block a user