NFS crash in 2.0.27 + fix

Wichert Akkerman (wakkerma@hupnos.wi.leidenuniv.nl)
14 Jan 1997 11:33:38 GMT


We have been installing a net network of 27 PC's running Linux and Windows NT
here. In the process I've run satan agains the clients and found an interesting
problem: every machine crashes with the message 1RPC: invalid RPC reply size 1'.
Apparently the nfs code detected an illegal message and reported it, but did
not remove it from the buffer. The patch below fixes this:

--- /tmp/rpcsock.c Tue Jan 14 12:21:37 1997
+++ rpcsock.c Tue Jan 14 11:59:43 1997
@@ -357,6 +357,9 @@
if (result < 4) {
printk(KERN_WARNING "RPC: impossible RPC reply size %d\n",
result);
+ iov[0].iov_base=(void*)&xid; /* xid=32bits, which is large en
ough */
+ iov[0].iov_len=result;
+ rpc_recvmsg(rsock, iov, 1, result, 0);
return 0;
}

-----------------------------------------------------------------------------
Wichert Akkerman wakkerma@debian.org
http://www.wi.leidenuniv.nl/~wakkerma/ Phone: +31-71-5277043

-- 
==============================================================================
This combination of bytes forms a message written to you by Wichert Akkerman.
E-Mail: wakkerma@wi.LeidenUniv.nl
WWW: http://www.wi.leidenuniv.nl/~wakkerma/