diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2015-07-17 14:01:11 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-09-29 11:14:11 +0200 |
commit | 11cea763c4c2c51933f16e6d761afa19ab71e74c (patch) | |
tree | d5fad6cc01f0cbeaa0dff9a8a05e5e03ee1a4cc4 /net | |
parent | 19e352cad241ecb7c5b2b3436c9ce64002d6ff26 (diff) | |
download | lwn-11cea763c4c2c51933f16e6d761afa19ab71e74c.tar.gz lwn-11cea763c4c2c51933f16e6d761afa19ab71e74c.zip |
net: ratelimit warnings about dst entry refcount underflow or overflow
commit 8bf4ada2e21378816b28205427ee6b0e1ca4c5f1 upstream.
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dst.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/dst.c b/net/core/dst.c index c07070544e3f..31344009de25 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -282,7 +282,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 (!newrefcnt && unlikely(dst->flags & DST_NOCACHE)) call_rcu(&dst->rcu_head, dst_destroy_rcu); } |