Skip to contentSkip to conversation

net: ratelimit warnings about dst entry refcount underflow or overflow

PATCH Applied Konstantin Khlebnikov 2 participants 2 messages Jul 17, 2015 – Jul 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: ratelimit warnings about dst entry refcount underflow or overflow

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.

---
 net/core/dst.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/core/dst.c +3 -1
index e956ce6d1378..002144bea935 100644
@@ -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);
 	}
maintainer Applied
#1 lore raw

From: Konstantin Khlebnikov <[email protected]>
Date: Fri, 17 Jul 2015 14:01:11 +0300

Quoted 7 lines

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.

Applied.