Commit 8888c5d7 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[NET]: Replace dst_release refcount error with standard WARN_ON

Replace the dst count underflow bug message with a standard WARN message.
This makes errors noticeable and also reduces the kernel text size by 600
since we aren't doing as much to setup the printk.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 72d7b9d4
...@@ -142,16 +142,11 @@ struct dst_entry * dst_clone(struct dst_entry * dst) ...@@ -142,16 +142,11 @@ struct dst_entry * dst_clone(struct dst_entry * dst)
return dst; return dst;
} }
extern const char dst_underflow_bug_msg[];
static inline static inline
void dst_release(struct dst_entry * dst) void dst_release(struct dst_entry * dst)
{ {
if (dst) { if (dst) {
if (atomic_read(&dst->__refcnt) < 1) WARN_ON(atomic_read(&dst->__refcnt) < 1);
printk(dst_underflow_bug_msg,
atomic_read(&dst->__refcnt),
dst, current_text_addr());
atomic_dec(&dst->__refcnt); atomic_dec(&dst->__refcnt);
} }
} }
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#include <net/dst.h> #include <net/dst.h>
const char dst_underflow_bug_msg[] = KERN_DEBUG "BUG: dst underflow %d: %p at %p\n";
/* Locking strategy: /* Locking strategy:
* 1) Garbage collection state of dead destination cache * 1) Garbage collection state of dead destination cache
* entries is protected by dst_lock. * entries is protected by dst_lock.
...@@ -275,7 +273,6 @@ void __init dst_init(void) ...@@ -275,7 +273,6 @@ void __init dst_init(void)
register_netdevice_notifier(&dst_dev_notifier); register_netdevice_notifier(&dst_dev_notifier);
} }
EXPORT_SYMBOL(dst_underflow_bug_msg);
EXPORT_SYMBOL(__dst_free); EXPORT_SYMBOL(__dst_free);
EXPORT_SYMBOL(dst_alloc); EXPORT_SYMBOL(dst_alloc);
EXPORT_SYMBOL(dst_destroy); EXPORT_SYMBOL(dst_destroy);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment