Commit f319e5fa authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: Fix problem with buffer length with rpc/tcp

I forgot to add '1' for the record-length header in RPC/TCP.
 Thanks to  Hirokazu Takahashi <taka@valinux.co.jp>
parent 988d8f66
......@@ -882,9 +882,9 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp)
dprintk("svc: TCP complete record (%d bytes)\n", len);
/* Position reply write pointer immediately args,
/* Position reply write pointer immediately after args,
* allowing for record length */
rqstp->rq_resbuf.base = rqstp->rq_argbuf.base + (len>>2);
rqstp->rq_resbuf.base = rqstp->rq_argbuf.base + 1 + (len>>2);
rqstp->rq_resbuf.buf = rqstp->rq_resbuf.base + 1;
rqstp->rq_resbuf.len = 1;
rqstp->rq_resbuf.buflen= rqstp->rq_argbuf.buflen - (len>>2) - 1;
......@@ -892,7 +892,7 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp)
rqstp->rq_skbuff = 0;
rqstp->rq_argbuf.buf += 1;
rqstp->rq_argbuf.len = (len >> 2);
rqstp->rq_argbuf.buflen = (len >> 2);
rqstp->rq_argbuf.buflen = (len >> 2) +1;
rqstp->rq_prot = IPPROTO_TCP;
/* Reset TCP read info */
......
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