patch-2.3.40 linux/net/sunrpc/svcsock.c

Next file: linux/net/sunrpc/xprt.c
Previous file: linux/net/sunrpc/svc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.39/linux/net/sunrpc/svcsock.c linux/net/sunrpc/svcsock.c
@@ -266,10 +266,10 @@
 	set_fs(oldfs);
 #endif
 
-	dprintk("svc: socket %p sendto([%p %d... ], %d, %d) = %d\n",
-			rqstp->rq_sock,
-			iov[0].iov_base, iov[0].iov_len, nr,
-			buflen, len);
+	dprintk("svc: socket %p sendto([%p %lu... ], %d, %d) = %d\n",
+		rqstp->rq_sock, iov[0].iov_base,
+		(unsigned long) iov[0].iov_len, nr,
+		buflen, len);
 
 	return len;
 }
@@ -326,8 +326,8 @@
 	set_fs(oldfs);
 #endif
 
-	dprintk("svc: socket %p recvfrom(%p, %d) = %d\n", rqstp->rq_sock,
-				iov[0].iov_base, iov[0].iov_len, len);
+	dprintk("svc: socket %p recvfrom(%p, %lu) = %d\n", rqstp->rq_sock,
+		iov[0].iov_base, (unsigned long) iov[0].iov_len, len);
 
 	return len;
 }
@@ -526,16 +526,18 @@
 	newsock->ops = ops = sock->ops;
 
 	if ((err = ops->accept(sock, newsock, O_NONBLOCK)) < 0) {
-		printk(KERN_WARNING "%s: accept failed (err %d)!\n",
-					serv->sv_name, -err);
+		if (net_ratelimit())
+			printk(KERN_WARNING "%s: accept failed (err %d)!\n",
+				   serv->sv_name, -err);
 		goto failed;		/* aborted connection or whatever */
 	}
 
 	slen = sizeof(sin);
 	err = ops->getname(newsock, (struct sockaddr *) &sin, &slen, 1);
 	if (err < 0) {
-		printk(KERN_WARNING "%s: peername failed (err %d)!\n",
-					serv->sv_name, -err);
+		if (net_ratelimit())
+			printk(KERN_WARNING "%s: peername failed (err %d)!\n",
+				   serv->sv_name, -err);
 		goto failed;		/* aborted connection or whatever */
 	}
 
@@ -543,10 +545,11 @@
 	 * hosts here, but we have no generic client tables. For now,
 	 * we just punt connects from unprivileged ports. */
 	if (ntohs(sin.sin_port) >= 1024) {
-		printk(KERN_WARNING
-			"%s: connect from unprivileged port: %s:%d",
-			serv->sv_name, 
-			in_ntoa(sin.sin_addr.s_addr), ntohs(sin.sin_port));
+		if (net_ratelimit())
+			printk(KERN_WARNING
+				   "%s: connect from unprivileged port: %s:%d",
+				   serv->sv_name, 
+				   in_ntoa(sin.sin_addr.s_addr), ntohs(sin.sin_port));
 		goto failed;
 	}
 
@@ -913,7 +916,7 @@
 	int		error;
 	int		type;
 
-	dprintk("svc: svc_create_socket(%s, %d, %08lx:%d)\n",
+	dprintk("svc: svc_create_socket(%s, %d, %08x:%d)\n",
 				serv->sv_program->pg_name, protocol,
 				ntohl(sin->sin_addr.s_addr),
 				ntohs(sin->sin_port));

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)