diff options
author | 2025-01-16 14:34:36 +0900 | |
---|---|---|
committer | 2025-01-20 11:27:40 -0800 | |
commit | 4d0446b7a214e2aa28c0e914329610731f665ad2 (patch) | |
tree | 7f92b44a78e6313e672a3ed10759c9dbeccc0f63 /net/unix/af_unix.c | |
parent | af_unix: Set drop reason in unix_release_sock(). (diff) | |
download | linux-rng-4d0446b7a214e2aa28c0e914329610731f665ad2.tar.xz linux-rng-4d0446b7a214e2aa28c0e914329610731f665ad2.zip |
af_unix: Set drop reason in unix_sock_destructor().
unix_sock_destructor() is called as sk->sk_destruct() just before
the socket is actually freed.
Let's use SKB_DROP_REASON_SOCKET_CLOSE for skb_queue_purge().
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250116053441.5758-4-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index a05d25cc5545..41b99984008a 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -640,7 +640,7 @@ static void unix_sock_destructor(struct sock *sk) { struct unix_sock *u = unix_sk(sk); - skb_queue_purge(&sk->sk_receive_queue); + skb_queue_purge_reason(&sk->sk_receive_queue, SKB_DROP_REASON_SOCKET_CLOSE); DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc)); DEBUG_NET_WARN_ON_ONCE(!sk_unhashed(sk)); |