netdev
[Top] [All Lists]

Re: [NET] Add missing newline for skb_*_panic

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [NET] Add missing newline for skb_*_panic
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Fri, 22 Apr 2005 00:20:08 +0200
Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <42682527.3000709@xxxxxxxxx>
References: <20050421050815.GA23133@xxxxxxxxxxxxxxxxxxx> <42682527.3000709@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050324 Debian/1.7.6-1
Patrick McHardy wrote:
How about this one instead? Besides the missing newlines, it adds
head/data/tail/end to the output, which can give valuable hints
about what happend before.

While we're at it, lets also replace KERN_INFO by KERN_EMERG to
make sure the user gets to see it.

Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>


===== net/core/skbuff.c 1.44 vs edited =====
--- 1.44/net/core/skbuff.c      2005-03-11 21:32:26 +01:00
+++ edited/net/core/skbuff.c    2005-04-22 00:18:53 +02:00
@@ -86,8 +86,10 @@
  */
 void skb_over_panic(struct sk_buff *skb, int sz, void *here)
 {
-       printk(KERN_INFO "skput:over: %p:%d put:%d dev:%s",
-               here, skb->len, sz, skb->dev ? skb->dev->name : "<NULL>");
+       printk(KERN_EMERG "skb_over_panic: text:%p len:%d put:%d head:%p "
+                         "data:%p tail:%p end:%p dev:%s\n",
+              here, skb->len, sz, skb->head, skb->data, skb->tail, skb->end,
+              skb->dev ? skb->dev->name : "<NULL>");
        BUG();
 }
 
@@ -102,8 +104,10 @@
 
 void skb_under_panic(struct sk_buff *skb, int sz, void *here)
 {
-       printk(KERN_INFO "skput:under: %p:%d put:%d dev:%s",
-               here, skb->len, sz, skb->dev ? skb->dev->name : "<NULL>");
+       printk(KERN_EMERG "skb_under_panic: text:%p len:%d put:%d head:%p "
+                         "data:%p tail:%p end:%p dev:%s\n",
+              here, skb->len, sz, skb->head, skb->data, skb->tail, skb->end,
+              skb->dev ? skb->dev->name : "<NULL>");
        BUG();
 }
 
<Prev in Thread] Current Thread [Next in Thread>