Home Home > GIT Browse
diff options
authorWolfgang Walter <wolfgang.walter@studentenwerk.mhn.de>2007-09-20 15:51:46 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-09-26 10:54:39 -0700
commitd41c6d512f41caaa510800c4efbd855ffc169e65 (patch)
parent88bf3e2706e93abe55e7c0c95b9433e7a3f0b15b (diff)
rpc: fix garbage in printk in svc_tcp_accept()
commit 9db619e66503494e41159de3c76fafabe80d016b in mainline. we upgraded the kernel of a nfs-server from to Since then we get the message lockd: too many open TCP sockets, consider increasing the number of nfsd threads lockd: last TCP connect from ^\\236^\É^D These random characters in the second line are caused by a bug in svc_tcp_accept. (Note: there are two previous __svc_print_addr(sin, buf, sizeof(buf)) calls in this function, either of which would initialize buf correctly; but both are inside "if"'s and are not necessarily executed. This is less obvious in the second case, which is inside a dprintk(), which is a macro which expands to an if statement.) Signed-off-by: Wolfgang Walter <wolfgang.walter@studentenwerk.mhn.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 5baf48de2558..8a59cfbbc1d7 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1090,7 +1090,8 @@ svc_tcp_accept(struct svc_sock *svsk)
"%s: last TCP connect from %s\n",
- serv->sv_name, buf);
+ serv->sv_name, __svc_print_addr(sin,
+ buf, sizeof(buf)));
* Always select the oldest socket. It's not fair,