Message ID | 20091022203512.1d714d5a@infradead.org |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Arjan van de Ven <arjan@infradead.org> Date: Thu, 22 Oct 2009 20:35:12 -0700 > 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> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 90b2e06..a0e56db 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, goto found_ok_skb; if (tcp_hdr(skb)->fin) goto found_fin_ok; - if (WARN_ON(!(flags & MSG_PEEK))) - printk(KERN_INFO "recvmsg bug 2: copied %X " - "seq %X\n", *seq, TCP_SKB_CB(skb)->seq); + WARN(!(flags & MSG_PEEK), KERN_INFO "recvmsg bug 2: " + "copied %X seq %X\n", *seq, + TCP_SKB_CB(skb)->seq); } /* Well, if we have backlog, try to process it now yet. */