All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@oss.sgi.com
Subject: Re: [NET] Add missing newline for skb_*_panic
Date: Fri, 22 Apr 2005 00:11:51 +0200	[thread overview]
Message-ID: <42682527.3000709@trash.net> (raw)
In-Reply-To: <20050421050815.GA23133@gondor.apana.org.au>

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

Herbert Xu wrote:
> Here is a trivial patch to make the skb_under_panic/skb_over_panic
> messages to look nicer.  As it is their printk is joined onto the
> first line of the BUG output because of a missing newline.

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.

Signed-off-by: Patrick McHardy <kaber@trash.net>

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1092 bytes --]

===== 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:08:09 +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_INFO "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_INFO "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();
 }
 

  reply	other threads:[~2005-04-21 22:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21  5:08 [NET] Add missing newline for skb_*_panic Herbert Xu
2005-04-21 22:11 ` Patrick McHardy [this message]
2005-04-21 22:20   ` Patrick McHardy
2005-04-21 23:14     ` Herbert Xu
2005-04-21 23:25       ` Patrick McHardy
2005-04-21 23:50         ` Herbert Xu
2005-04-22  0:02           ` Patrick McHardy
2005-04-21 23:44     ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42682527.3000709@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.