aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-10-23 00:37:56 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-23 00:37:56 -0400
commitc62f4c453ab4b0240ab857bfd089da2c01ad91e7 (patch)
tree2c99ed102d752d762cc051ee1e89539e0453bdc0 /net/ipv4
parent74eee2e8d08048c847d1998c686e12a477ff939a (diff)
net: use WARN() for the WARN_ON in commit b6b39e8f3fbbb
Commit b6b39e8f3fbbb (tcp: Try to catch MSG_PEEK bug) added a printk() to the WARN_ON() that's in tcp.c. This patch changes this combination to WARN(); the advantage of WARN() is that the printk message shows up inside the message, so that kerneloops.org will collect the message. In addition, this gets rid of an extra if() statement. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 90b2e0649bf..98440ad8255 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1442,9 +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 if (WARN_ON(!(flags & MSG_PEEK))) 1445 WARN(!(flags & MSG_PEEK), KERN_INFO "recvmsg bug 2: "
1446 printk(KERN_INFO "recvmsg bug 2: copied %X " 1446 "copied %X seq %X\n", *seq,
1447 "seq %X\n", *seq, TCP_SKB_CB(skb)->seq); 1447 TCP_SKB_CB(skb)->seq);
1448 } 1448 }
1449 1449
1450 /* Well, if we have backlog, try to process it now yet. */ 1450 /* Well, if we have backlog, try to process it now yet. */