Commit 35146cf5 authored by Frank Cusack's avatar Frank Cusack Committed by Linus Torvalds

[PATCH] Fix rpc_setbufsize() usage

 - fix null dereference on xprt->inet if (!connected), which happens if
   a rpc cred wasn't available (root+auth_gss case)
 - set bufsize on reconnect
parent 5503fda1
......@@ -385,7 +385,8 @@ rpc_setbufsize(struct rpc_clnt *clnt, unsigned int sndsize, unsigned int rcvsize
xprt->rcvsize = 0;
if (rcvsize)
xprt->rcvsize = rcvsize + RPC_SLACK_SPACE;
xprt_sock_setbufsize(xprt);
if (xprt_connected(xprt))
xprt_sock_setbufsize(xprt);
}
/*
......
......@@ -436,6 +436,7 @@ xprt_connect(struct rpc_task *task)
goto out_write;
}
xprt_bind_socket(xprt, sock);
xprt_sock_setbufsize(xprt);
if (!xprt->stream)
goto out_write;
......
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