* [PATCH] net: use WARN() for the WARN_ON in commit b6b39e8f3fbbb
@ 2009-10-23 3:35 Arjan van de Ven
2009-10-23 4:38 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Arjan van de Ven @ 2009-10-23 3:35 UTC (permalink / raw)
To: herbert, netdev
>From d63ae5a34f2ed0821870c9e4c797e4e095f0c58a Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Thu, 22 Oct 2009 20:32:24 -0700
Subject: [PATCH] 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>
---
net/ipv4/tcp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
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. */
--
1.6.2.5
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: use WARN() for the WARN_ON in commit b6b39e8f3fbbb
2009-10-23 3:35 [PATCH] net: use WARN() for the WARN_ON in commit b6b39e8f3fbbb Arjan van de Ven
@ 2009-10-23 4:38 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-10-23 4:38 UTC (permalink / raw)
To: arjan; +Cc: herbert, netdev
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-23 4:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-23 3:35 [PATCH] net: use WARN() for the WARN_ON in commit b6b39e8f3fbbb Arjan van de Ven
2009-10-23 4:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).