aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 084a0ad5c64e..124ff0ceb55b 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -60,8 +60,8 @@ static void call_refreshresult(struct rpc_task *task);
60static void call_timeout(struct rpc_task *task); 60static void call_timeout(struct rpc_task *task);
61static void call_connect(struct rpc_task *task); 61static void call_connect(struct rpc_task *task);
62static void call_connect_status(struct rpc_task *task); 62static void call_connect_status(struct rpc_task *task);
63static u32 * call_header(struct rpc_task *task); 63static __be32 * call_header(struct rpc_task *task);
64static u32 * call_verify(struct rpc_task *task); 64static __be32 * call_verify(struct rpc_task *task);
65 65
66 66
67static int 67static int
@@ -782,7 +782,7 @@ call_encode(struct rpc_task *task)
782 struct xdr_buf *rcvbuf = &req->rq_rcv_buf; 782 struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
783 unsigned int bufsiz; 783 unsigned int bufsiz;
784 kxdrproc_t encode; 784 kxdrproc_t encode;
785 u32 *p; 785 __be32 *p;
786 786
787 dprintk("RPC: %4d call_encode (status %d)\n", 787 dprintk("RPC: %4d call_encode (status %d)\n",
788 task->tk_pid, task->tk_status); 788 task->tk_pid, task->tk_status);
@@ -1100,7 +1100,7 @@ call_decode(struct rpc_task *task)
1100 struct rpc_clnt *clnt = task->tk_client; 1100 struct rpc_clnt *clnt = task->tk_client;
1101 struct rpc_rqst *req = task->tk_rqstp; 1101 struct rpc_rqst *req = task->tk_rqstp;
1102 kxdrproc_t decode = task->tk_msg.rpc_proc->p_decode; 1102 kxdrproc_t decode = task->tk_msg.rpc_proc->p_decode;
1103 u32 *p; 1103 __be32 *p;
1104 1104
1105 dprintk("RPC: %4d call_decode (status %d)\n", 1105 dprintk("RPC: %4d call_decode (status %d)\n",
1106 task->tk_pid, task->tk_status); 1106 task->tk_pid, task->tk_status);
@@ -1197,12 +1197,12 @@ call_refreshresult(struct rpc_task *task)
1197/* 1197/*
1198 * Call header serialization 1198 * Call header serialization
1199 */ 1199 */
1200static u32 * 1200static __be32 *
1201call_header(struct rpc_task *task) 1201call_header(struct rpc_task *task)
1202{ 1202{
1203 struct rpc_clnt *clnt = task->tk_client; 1203 struct rpc_clnt *clnt = task->tk_client;
1204 struct rpc_rqst *req = task->tk_rqstp; 1204 struct rpc_rqst *req = task->tk_rqstp;
1205 u32 *p = req->rq_svec[0].iov_base; 1205 __be32 *p = req->rq_svec[0].iov_base;
1206 1206
1207 /* FIXME: check buffer size? */ 1207 /* FIXME: check buffer size? */
1208 1208
@@ -1221,12 +1221,13 @@ call_header(struct rpc_task *task)
1221/* 1221/*
1222 * Reply header verification 1222 * Reply header verification
1223 */ 1223 */
1224static u32 * 1224static __be32 *
1225call_verify(struct rpc_task *task) 1225call_verify(struct rpc_task *task)
1226{ 1226{
1227 struct kvec *iov = &task->tk_rqstp->rq_rcv_buf.head[0]; 1227 struct kvec *iov = &task->tk_rqstp->rq_rcv_buf.head[0];
1228 int len = task->tk_rqstp->rq_rcv_buf.len >> 2; 1228 int len = task->tk_rqstp->rq_rcv_buf.len >> 2;
1229 u32 *p = iov->iov_base, n; 1229 __be32 *p = iov->iov_base;
1230 u32 n;
1230 int error = -EACCES; 1231 int error = -EACCES;
1231 1232
1232 if ((task->tk_rqstp->rq_rcv_buf.len & 3) != 0) { 1233 if ((task->tk_rqstp->rq_rcv_buf.len & 3) != 0) {
@@ -1303,7 +1304,7 @@ call_verify(struct rpc_task *task)
1303 printk(KERN_WARNING "call_verify: auth check failed\n"); 1304 printk(KERN_WARNING "call_verify: auth check failed\n");
1304 goto out_garbage; /* bad verifier, retry */ 1305 goto out_garbage; /* bad verifier, retry */
1305 } 1306 }
1306 len = p - (u32 *)iov->iov_base - 1; 1307 len = p - (__be32 *)iov->iov_base - 1;
1307 if (len < 0) 1308 if (len < 0)
1308 goto out_overflow; 1309 goto out_overflow;
1309 switch ((n = ntohl(*p++))) { 1310 switch ((n = ntohl(*p++))) {
@@ -1358,12 +1359,12 @@ out_overflow:
1358 goto out_garbage; 1359 goto out_garbage;
1359} 1360}
1360 1361
1361static int rpcproc_encode_null(void *rqstp, u32 *data, void *obj) 1362static int rpcproc_encode_null(void *rqstp, __be32 *data, void *obj)
1362{ 1363{
1363 return 0; 1364 return 0;
1364} 1365}
1365 1366
1366static int rpcproc_decode_null(void *rqstp, u32 *data, void *obj) 1367static int rpcproc_decode_null(void *rqstp, __be32 *data, void *obj)
1367{ 1368{
1368 return 0; 1369 return 0;
1369} 1370}