projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
af_unix: use DEBUG_NET_WARN_ON_ONCE()
[platform/kernel/linux-starfive.git]
/
net
/
unix
/
af_unix.c
diff --git
a/net/unix/af_unix.c
b/net/unix/af_unix.c
index
654dcef
..
3453e00
100644
(file)
--- 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)
{
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]);
}
@@
-490,7
+490,7
@@
static int unix_dgram_peer_wake_me(struct sock *sk, struct sock *other)
* -ECONNREFUSED. Otherwise, if we haven't queued any skbs
* to other and its full, we will hang waiting for POLLOUT.
*/
* -ECONNREFUSED. Otherwise, if we haven't queued any skbs
* to other and its full, we will hang waiting for POLLOUT.
*/
- if (unix_recvq_full(other) && !sock_flag(other, SOCK_DEAD))
+ if (unix_recvq_full
_lockless
(other) && !sock_flag(other, SOCK_DEAD))
return 1;
if (connected)
return 1;
if (connected)
@@
-554,9
+554,9
@@
static void unix_sock_destructor(struct sock *sk)
u->oob_skb = NULL;
}
#endif
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;
if (!sock_flag(sk, SOCK_DEAD)) {
pr_info("Attempt to release alive unix socket: %p\n", sk);
return;