diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-10-19 15:41:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-20 03:51:57 -0400 |
commit | b6b39e8f3fbbb31001b836afec87bcaf4811a7bf (patch) | |
tree | 33cf8d3732bde60abc7651b0ecf78e297d7b0afb /net/ipv4 | |
parent | 55b8050353c4a212c94d7156e2bd5885225b869b (diff) |
tcp: Try to catch MSG_PEEK bug
This patch tries to print out more information when we hit the
MSG_PEEK bug in tcp_recvmsg. It's been around since at least
2005 and it's about time that we finally fix it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 9b2756fbdf9b..90b2e0649bfb 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1442,7 +1442,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
1442 | goto found_ok_skb; | 1442 | goto found_ok_skb; |
1443 | if (tcp_hdr(skb)->fin) | 1443 | if (tcp_hdr(skb)->fin) |
1444 | goto found_fin_ok; | 1444 | goto found_fin_ok; |
1445 | WARN_ON(!(flags & MSG_PEEK)); | 1445 | if (WARN_ON(!(flags & MSG_PEEK))) |
1446 | printk(KERN_INFO "recvmsg bug 2: copied %X " | ||
1447 | "seq %X\n", *seq, TCP_SKB_CB(skb)->seq); | ||
1446 | } | 1448 | } |
1447 | 1449 | ||
1448 | /* Well, if we have backlog, try to process it now yet. */ | 1450 | /* Well, if we have backlog, try to process it now yet. */ |