diff options
author | Eric Dumazet <edumazet@google.com> | 2022-06-08 18:04:35 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-06-10 06:53:56 +0200 |
commit | dd29c67dbbbf97c8aa786a502977856d8eb9a73d (patch) | |
tree | cca3a837f3eaa74943407802f44f3071b77e74ad /net/unix | |
parent | net: use WARN_ON_ONCE() in sk_stream_kill_queues() (diff) | |
download | linux-dd29c67dbbbf97c8aa786a502977856d8eb9a73d.tar.xz linux-dd29c67dbbbf97c8aa786a502977856d8eb9a73d.zip |
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: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix')
-rw-r--r-- | net/unix/af_unix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 2206e6f8902d..3453e0053f76 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -302,7 +302,7 @@ static void __unix_remove_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]); } @@ -554,9 +554,9 @@ static void unix_sock_destructor(struct sock *sk) u->oob_skb = NULL; } #endif - WARN_ON(refcount_read(&sk->sk_wmem_alloc)); - WARN_ON(!sk_unhashed(sk)); - WARN_ON(sk->sk_socket); + DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc)); + DEBUG_NET_WARN_ON_ONCE(!sk_unhashed(sk)); + DEBUG_NET_WARN_ON_ONCE(sk->sk_socket); if (!sock_flag(sk, SOCK_DEAD)) { pr_info("Attempt to release alive unix socket: %p\n", sk); return; |