Commit 9734ad57 authored by Trond Myklebust's avatar Trond Myklebust

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: e92053a5 ("SUNRPC: Handle zero length fragments correctly")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 400417b0
...@@ -453,7 +453,7 @@ xs_read_xdr_buf(struct socket *sock, struct msghdr *msg, int flags, ...@@ -453,7 +453,7 @@ xs_read_xdr_buf(struct socket *sock, struct msghdr *msg, int flags,
goto out; goto out;
if (ret != want) if (ret != want)
goto out; goto out;
} else } else if (offset < seek_init)
offset = seek_init; offset = seek_init;
ret = -EMSGSIZE; ret = -EMSGSIZE;
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment