Commit 03d7a386 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] PATCH - kNFSd - More small fixes for TCP nfsd

sk_inuse should be bigger than "char" as we can
have more than 255 server threads.  Due to the way the count
is used, this is unlikely to actually cause a problem, but it
should nonetheless be fixed.

Also, two printk generate more noise than we would like,
so turn them into dprintk (debugging printk).
parent d2279c44
......@@ -21,7 +21,7 @@ struct svc_sock {
struct sock * sk_sk; /* INET layer */
struct svc_serv * sk_server; /* service for this socket */
unsigned char sk_inuse; /* use count */
unsigned int sk_inuse; /* use count */
unsigned long sk_flags;
#define SK_BUSY 0 /* enqueued/receiving */
#define SK_CONN 1 /* conn pending */
......
......@@ -703,8 +703,7 @@ svc_tcp_accept(struct svc_sock *svsk)
* tell us anything. For now just warn about unpriv connections.
*/
if (ntohs(sin.sin_port) >= 1024) {
if (net_ratelimit())
printk(KERN_WARNING
dprintk(KERN_WARNING
"%s: connect from unprivileged port: %u.%u.%u.%u:%d\n",
serv->sv_name,
NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port));
......@@ -1286,7 +1285,7 @@ svc_delete_socket(struct svc_sock *svsk)
kfree(svsk);
} else {
spin_unlock_bh(&serv->sv_lock);
printk(KERN_NOTICE "svc: server socket destroy delayed\n");
dprintk(KERN_NOTICE "svc: server socket destroy delayed\n");
/* svsk->sk_server = NULL; */
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment