Skip to content

Commit

Permalink
svcrpc: fix off-by-4 error in "incomplete TCP record" dprintk
Browse files Browse the repository at this point in the history
The full reclen doesn't include the fragment header, but sk_tcplen does.
Fix this to make it an apples-to-apples comparison.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed Dec 4, 2012
1 parent ad46ccf commit 6a72ae2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/sunrpc/svcsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,8 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp)
if (len < 0 && len != -EAGAIN)
goto err_delete;
dprintk("svc: incomplete TCP record (%d of %d)\n",
svsk->sk_tcplen, svc_sock_reclen(svsk));
svsk->sk_tcplen - sizeof(rpc_fraghdr),
svc_sock_reclen(svsk));
goto err_noclose;
}

Expand Down

0 comments on commit 6a72ae2

Please sign in to comment.