aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-08-04 00:36:46 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-04 00:36:46 -0400
commit0e76a3a587fc7abda2badf249053b427baad255e (patch)
tree646a1da67dc25654552028225ca4b7a0a8043cc9 /net/sunrpc
parentfba3679d34511c42bf452e89dda457a1219eb43a (diff)
parent72a67a94bcba71a5fddd6b3596a20604d2b5dcd6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge net into net-next to setup some infrastructure Eric Dumazet needs for usbnet changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth_gss/gss_rpc_upcall.c3
-rw-r--r--net/sunrpc/auth_gss/gss_rpc_xdr.c9
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c2
-rw-r--r--net/sunrpc/clnt.c1
-rw-r--r--net/sunrpc/svcsock.c4
5 files changed, 11 insertions, 8 deletions
diff --git a/net/sunrpc/auth_gss/gss_rpc_upcall.c b/net/sunrpc/auth_gss/gss_rpc_upcall.c
index d304f41260f2..af7ffd447fee 100644
--- a/net/sunrpc/auth_gss/gss_rpc_upcall.c
+++ b/net/sunrpc/auth_gss/gss_rpc_upcall.c
@@ -120,7 +120,7 @@ static int gssp_rpc_create(struct net *net, struct rpc_clnt **_clnt)
120 if (IS_ERR(clnt)) { 120 if (IS_ERR(clnt)) {
121 dprintk("RPC: failed to create AF_LOCAL gssproxy " 121 dprintk("RPC: failed to create AF_LOCAL gssproxy "
122 "client (errno %ld).\n", PTR_ERR(clnt)); 122 "client (errno %ld).\n", PTR_ERR(clnt));
123 result = -PTR_ERR(clnt); 123 result = PTR_ERR(clnt);
124 *_clnt = NULL; 124 *_clnt = NULL;
125 goto out; 125 goto out;
126 } 126 }
@@ -328,7 +328,6 @@ void gssp_free_upcall_data(struct gssp_upcall_data *data)
328 kfree(data->in_handle.data); 328 kfree(data->in_handle.data);
329 kfree(data->out_handle.data); 329 kfree(data->out_handle.data);
330 kfree(data->out_token.data); 330 kfree(data->out_token.data);
331 kfree(data->mech_oid.data);
332 free_svc_cred(&data->creds); 331 free_svc_cred(&data->creds);
333} 332}
334 333
diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c
index 357f613df7ff..3c85d1c8a028 100644
--- a/net/sunrpc/auth_gss/gss_rpc_xdr.c
+++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c
@@ -430,7 +430,7 @@ static int dummy_enc_nameattr_array(struct xdr_stream *xdr,
430static int dummy_dec_nameattr_array(struct xdr_stream *xdr, 430static int dummy_dec_nameattr_array(struct xdr_stream *xdr,
431 struct gssx_name_attr_array *naa) 431 struct gssx_name_attr_array *naa)
432{ 432{
433 struct gssx_name_attr dummy; 433 struct gssx_name_attr dummy = { .attr = {.len = 0} };
434 u32 count, i; 434 u32 count, i;
435 __be32 *p; 435 __be32 *p;
436 436
@@ -493,12 +493,13 @@ static int gssx_enc_name(struct xdr_stream *xdr,
493 return err; 493 return err;
494} 494}
495 495
496
496static int gssx_dec_name(struct xdr_stream *xdr, 497static int gssx_dec_name(struct xdr_stream *xdr,
497 struct gssx_name *name) 498 struct gssx_name *name)
498{ 499{
499 struct xdr_netobj dummy_netobj; 500 struct xdr_netobj dummy_netobj = { .len = 0 };
500 struct gssx_name_attr_array dummy_name_attr_array; 501 struct gssx_name_attr_array dummy_name_attr_array = { .count = 0 };
501 struct gssx_option_array dummy_option_array; 502 struct gssx_option_array dummy_option_array = { .count = 0 };
502 int err; 503 int err;
503 504
504 /* name->display_name */ 505 /* name->display_name */
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index d0347d148b34..09fb638bcaa4 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -1180,6 +1180,7 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
1180 gm = gss_mech_get_by_OID(&ud->mech_oid); 1180 gm = gss_mech_get_by_OID(&ud->mech_oid);
1181 if (!gm) 1181 if (!gm)
1182 goto out; 1182 goto out;
1183 rsci.cred.cr_gss_mech = gm;
1183 1184
1184 status = -EINVAL; 1185 status = -EINVAL;
1185 /* mech-specific data: */ 1186 /* mech-specific data: */
@@ -1195,7 +1196,6 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
1195 rscp = rsc_update(cd, &rsci, rscp); 1196 rscp = rsc_update(cd, &rsci, rscp);
1196 status = 0; 1197 status = 0;
1197out: 1198out:
1198 gss_mech_put(gm);
1199 rsc_free(&rsci); 1199 rsc_free(&rsci);
1200 if (rscp) 1200 if (rscp)
1201 cache_put(&rscp->h, cd); 1201 cache_put(&rscp->h, cd);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 9963584605c0..74f6a704e374 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -309,6 +309,7 @@ static int rpc_client_register(const struct rpc_create_args *args,
309 return 0; 309 return 0;
310err_auth: 310err_auth:
311 pipefs_sb = rpc_get_sb_net(net); 311 pipefs_sb = rpc_get_sb_net(net);
312 rpc_unregister_client(clnt);
312 __rpc_clnt_remove_pipedir(clnt); 313 __rpc_clnt_remove_pipedir(clnt);
313out: 314out:
314 if (pipefs_sb) 315 if (pipefs_sb)
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 0da6785ec15a..9c9caaa5e0d3 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1193,7 +1193,9 @@ static int svc_tcp_has_wspace(struct svc_xprt *xprt)
1193 if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) 1193 if (test_bit(XPT_LISTENER, &xprt->xpt_flags))
1194 return 1; 1194 return 1;
1195 required = atomic_read(&xprt->xpt_reserved) + serv->sv_max_mesg; 1195 required = atomic_read(&xprt->xpt_reserved) + serv->sv_max_mesg;
1196 if (sk_stream_wspace(svsk->sk_sk) >= required) 1196 if (sk_stream_wspace(svsk->sk_sk) >= required ||
1197 (sk_stream_min_wspace(svsk->sk_sk) == 0 &&
1198 atomic_read(&xprt->xpt_reserved) == 0))
1197 return 1; 1199 return 1;
1198 set_bit(SOCK_NOSPACE, &svsk->sk_sock->flags); 1200 set_bit(SOCK_NOSPACE, &svsk->sk_sock->flags);
1199 return 0; 1201 return 0;