netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NET: save space for dst underflow message
@ 2004-07-05  8:00 YOSHIFUJI Hideaki / 吉藤英明
  2004-07-05 23:43 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-07-05  8:00 UTC (permalink / raw)
  To: davem; +Cc: netdev

Hello.

Save space for "dst underflow" message.

Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>

===== include/net/dst.h 1.19 vs edited =====
--- 1.19/include/net/dst.h	2004-06-24 17:55:48 +09:00
+++ edited/include/net/dst.h	2004-07-05 16:44:17 +09:00
@@ -142,15 +142,14 @@
 	return dst;
 }
 
+extern const char dst_underflow_bug_msg[];
+
 static inline
 void dst_release(struct dst_entry * dst)
 {
 	if (dst) {
-		if (atomic_read(&dst->__refcnt) < 1) {
-			printk("BUG: dst underflow %d: %p\n",
-			       atomic_read(&dst->__refcnt),
-			       current_text_addr());
-		}
+		if (atomic_read(&dst->__refcnt) < 1)
+			printk(dst_underflow_bug_msg, dst, current_text_addr());
 		atomic_dec(&dst->__refcnt);
 	}
 }
===== net/core/dst.c 1.20 vs edited =====
--- 1.20/net/core/dst.c	2004-06-18 04:09:54 +09:00
+++ edited/net/core/dst.c	2004-07-05 16:43:13 +09:00
@@ -19,6 +19,8 @@
 
 #include <net/dst.h>
 
+const char dst_underflow_bug_msg[] = KERN_DEBUG "BUG: dst underflow %d: %p at %p\n";
+
 /* Locking strategy:
  * 1) Garbage collection state of dead destination cache
  *    entries is protected by dst_lock.
@@ -273,6 +275,7 @@
 	register_netdevice_notifier(&dst_dev_notifier);
 }
 
+EXPORT_SYMBOL(dst_underflow_bug_msg);
 EXPORT_SYMBOL(__dst_free);
 EXPORT_SYMBOL(dst_alloc);
 EXPORT_SYMBOL(dst_destroy);

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] NET: save space for dst underflow message
  2004-07-05  8:00 [PATCH] NET: save space for dst underflow message YOSHIFUJI Hideaki / 吉藤英明
@ 2004-07-05 23:43 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-07-05 23:43 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev

On Mon, 05 Jul 2004 17:00:53 +0900 (JST)
YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:

> Save space for "dst underflow" message.
> 
> Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-05 23:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-05  8:00 [PATCH] NET: save space for dst underflow message YOSHIFUJI Hideaki / 吉藤英明
2004-07-05 23:43 ` David S. 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).