diff options
author | Ian Gudger <igudger@google.com> | 2018-12-13 13:19:39 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-12-13 13:20:46 -0800 |
commit | 4659f7ed1a63f031b5450d065684ef6c32d35f01 (patch) | |
tree | cfb15ddd2e80b2a497e3160352155fa6a2060c0f /pkg/sentry/socket/epsocket | |
parent | 6253d32cc932e76608be5c57a4870b3d61464487 (diff) |
Fix WAITALL and RCVTIMEO interaction
PiperOrigin-RevId: 225424296
Change-Id: I60fcc2b859339dca9963cb32227a287e719ab765
Diffstat (limited to 'pkg/sentry/socket/epsocket')
-rw-r--r-- | pkg/sentry/socket/epsocket/epsocket.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/socket/epsocket/epsocket.go b/pkg/sentry/socket/epsocket/epsocket.go index b49ef21ad..19af7bc45 100644 --- a/pkg/sentry/socket/epsocket/epsocket.go +++ b/pkg/sentry/socket/epsocket/epsocket.go @@ -1352,6 +1352,9 @@ func (s *SocketOperations) RecvMsg(t *kernel.Task, dst usermem.IOSequence, flags dst = dst.DropFirst(rn) if err := t.BlockWithDeadline(ch, haveDeadline, deadline); err != nil { + if n > 0 { + return n, senderAddr, senderAddrLen, controlMessages, nil + } if err == syserror.ETIMEDOUT { return 0, nil, 0, socket.ControlMessages{}, syserr.ErrTryAgain } |