patch-2.3.23 linux/net/sunrpc/clnt.c

Next file: linux/net/sunrpc/sched.c
Previous file: linux/net/ipv4/tcp_ipv4.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.22/linux/net/sunrpc/clnt.c linux/net/sunrpc/clnt.c
@@ -459,6 +459,7 @@
 	req->rq_rvec[0].iov_len  = bufsiz;
 	req->rq_rlen		 = bufsiz;
 	req->rq_rnr		 = 1;
+	req->rq_damaged		 = 0;
 
 	if (task->tk_proc > clnt->cl_maxproc) {
 		printk(KERN_WARNING "%s (vers %d): bad procedure number %d\n",
@@ -466,6 +467,9 @@
 		rpc_exit(task, -EIO);
 		return;
 	}
+
+	/* Zero buffer so we have automatic zero-padding of opaque & string */
+	memset(task->tk_buffer, 0, bufsiz);
 
 	/* Encode header and provided arguments */
 	encode = rpcproc_encode(clnt, task->tk_proc);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)