aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/svcsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r--net/sunrpc/svcsock.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 99f54fb6d669..ff1f8bf680aa 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1062,15 +1062,19 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp)
1062 * bit set in the fragment length header. 1062 * bit set in the fragment length header.
1063 * But apparently no known nfs clients send fragmented 1063 * But apparently no known nfs clients send fragmented
1064 * records. */ 1064 * records. */
1065 printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (non-terminal)\n", 1065 if (net_ratelimit())
1066 (unsigned long) svsk->sk_reclen); 1066 printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx"
1067 " (non-terminal)\n",
1068 (unsigned long) svsk->sk_reclen);
1067 goto err_delete; 1069 goto err_delete;
1068 } 1070 }
1069 svsk->sk_reclen &= 0x7fffffff; 1071 svsk->sk_reclen &= 0x7fffffff;
1070 dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen); 1072 dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen);
1071 if (svsk->sk_reclen > serv->sv_max_mesg) { 1073 if (svsk->sk_reclen > serv->sv_max_mesg) {
1072 printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx (large)\n", 1074 if (net_ratelimit())
1073 (unsigned long) svsk->sk_reclen); 1075 printk(KERN_NOTICE "RPC: bad TCP reclen 0x%08lx"
1076 " (large)\n",
1077 (unsigned long) svsk->sk_reclen);
1074 goto err_delete; 1078 goto err_delete;
1075 } 1079 }
1076 } 1080 }
@@ -1278,6 +1282,8 @@ svc_recv(struct svc_rqst *rqstp, long timeout)
1278 schedule_timeout_uninterruptible(msecs_to_jiffies(500)); 1282 schedule_timeout_uninterruptible(msecs_to_jiffies(500));
1279 rqstp->rq_pages[i] = p; 1283 rqstp->rq_pages[i] = p;
1280 } 1284 }
1285 rqstp->rq_pages[i++] = NULL; /* this might be seen in nfs_read_actor */
1286 BUG_ON(pages >= RPCSVC_MAXPAGES);
1281 1287
1282 /* Make arg->head point to first page and arg->pages point to rest */ 1288 /* Make arg->head point to first page and arg->pages point to rest */
1283 arg = &rqstp->rq_arg; 1289 arg = &rqstp->rq_arg;