Commit dd29c67d authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski

af_unix: use DEBUG_NET_WARN_ON_ONCE()

Replace four WARN_ON() that have not triggered recently
with DEBUG_NET_WARN_ON_ONCE().
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c59f02f8
...@@ -302,7 +302,7 @@ static void __unix_remove_socket(struct sock *sk) ...@@ -302,7 +302,7 @@ static void __unix_remove_socket(struct sock *sk)
static void __unix_insert_socket(struct sock *sk) static void __unix_insert_socket(struct sock *sk)
{ {
WARN_ON(!sk_unhashed(sk)); DEBUG_NET_WARN_ON_ONCE(!sk_unhashed(sk));
sk_add_node(sk, &unix_socket_table[sk->sk_hash]); sk_add_node(sk, &unix_socket_table[sk->sk_hash]);
} }
...@@ -554,9 +554,9 @@ static void unix_sock_destructor(struct sock *sk) ...@@ -554,9 +554,9 @@ static void unix_sock_destructor(struct sock *sk)
u->oob_skb = NULL; u->oob_skb = NULL;
} }
#endif #endif
WARN_ON(refcount_read(&sk->sk_wmem_alloc)); DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc));
WARN_ON(!sk_unhashed(sk)); DEBUG_NET_WARN_ON_ONCE(!sk_unhashed(sk));
WARN_ON(sk->sk_socket); DEBUG_NET_WARN_ON_ONCE(sk->sk_socket);
if (!sock_flag(sk, SOCK_DEAD)) { if (!sock_flag(sk, SOCK_DEAD)) {
pr_info("Attempt to release alive unix socket: %p\n", sk); pr_info("Attempt to release alive unix socket: %p\n", sk);
return; return;
......
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