diff options
| author | Frank Cusack <fcusack@fcusack.com> | 2003-07-16 20:28:11 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-16 20:28:11 -0700 |
| commit | 35146cf5a480d31c8198c55f8ffbc371fd550359 (patch) | |
| tree | 7f9707b24fed9a64dc2edd6d7b745fff970d80f0 | |
| parent | 5503fda166741fc8ea5f43b295e091f24cd01319 (diff) | |
[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
| -rw-r--r-- | net/sunrpc/clnt.c | 3 | ||||
| -rw-r--r-- | net/sunrpc/xprt.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 0d718713ede6..d0d214772e95 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -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); } /* diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 031035a4b0da..9791f54999cc 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -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; |
