Skip to content

Commit 9734ad5

Browse files
author
Trond Myklebust
committed
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: e92053a ("SUNRPC: Handle zero length fragments correctly") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 400417b commit 9734ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/xprtsock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ xs_read_xdr_buf(struct socket *sock, struct msghdr *msg, int flags,
453453
goto out;
454454
if (ret != want)
455455
goto out;
456-
} else
456+
} else if (offset < seek_init)
457457
offset = seek_init;
458458
ret = -EMSGSIZE;
459459
out:

0 commit comments

Comments
 (0)