1
0
Fork 0

SUNRPC: Fix a client regression when handling oversized replies

If the server sends a reply that is larger than the pre-allocated
buffer, then the current code may fail to register how much of
the stream that it has finished reading. This again can lead to
hangs.

Fixes: e92053a52e ("SUNRPC: Handle zero length fragments correctly")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
hifive-unleashed-5.1
Trond Myklebust 2019-03-15 12:47:34 -04:00
parent 400417b05f
commit 9734ad57b0
1 changed files with 1 additions and 1 deletions

View File

@ -453,7 +453,7 @@ xs_read_xdr_buf(struct socket *sock, struct msghdr *msg, int flags,
goto out;
if (ret != want)
goto out;
} else
} else if (offset < seek_init)
offset = seek_init;
ret = -EMSGSIZE;
out: