* [PATCH v2] net: ratelimit warnings about dst entry refcount underflow or overflow
@ 2015-07-17 11:01 Konstantin Khlebnikov
2015-07-21 7:11 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khlebnikov @ 2015-07-17 11:01 UTC (permalink / raw)
To: netdev, David S. Miller; +Cc: Eric Dumazet
Kernel generates a lot of warnings when dst entry reference counter
overflows and becomes negative. That bug was seen several times at
machines with outdated 3.10.y kernels. Most like it's already fixed
in upstream. Anyway that flood completely kills machine and makes
further debugging impossible.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
net/core/dst.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/dst.c b/net/core/dst.c
index e956ce6d1378..002144bea935 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -284,7 +284,9 @@ void dst_release(struct dst_entry *dst)
int newrefcnt;
newrefcnt = atomic_dec_return(&dst->__refcnt);
- WARN_ON(newrefcnt < 0);
+ if (unlikely(newrefcnt < 0))
+ net_warn_ratelimited("%s: dst:%p refcnt:%d\n",
+ __func__, dst, newrefcnt);
if (unlikely(dst->flags & DST_NOCACHE) && !newrefcnt)
call_rcu(&dst->rcu_head, dst_destroy_rcu);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-21 7:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-17 11:01 [PATCH v2] net: ratelimit warnings about dst entry refcount underflow or overflow Konstantin Khlebnikov
2015-07-21 7:11 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox