Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rpc: fix garbage in printk in svc_tcp_accept()

we upgraded the kernel of a nfs-server from 2.6.17.11 to 2.6.22.6. 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>

authored by

Wolfgang Walter and committed by
Linus Torvalds
9db619e6 f685ddaf

+2 -1
+2 -1
net/sunrpc/svcsock.c
··· 1110 1110 serv->sv_name); 1111 1111 printk(KERN_NOTICE 1112 1112 "%s: last TCP connect from %s\n", 1113 - serv->sv_name, buf); 1113 + serv->sv_name, __svc_print_addr(sin, 1114 + buf, sizeof(buf))); 1114 1115 } 1115 1116 /* 1116 1117 * Always select the oldest socket. It's not fair,