diff options
| author | Kuniyuki Iwashima <[email protected]> | 2025-01-16 05:34:36 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-01-20 19:27:40 +0000 |
| commit | 4d0446b7a214e2aa28c0e914329610731f665ad2 (patch) | |
| tree | 7f92b44a78e6313e672a3ed10759c9dbeccc0f63 /net/unix/af_unix.c | |
| parent | af_unix: Set drop reason in unix_release_sock(). (diff) | |
| download | kernel-4d0446b7a214e2aa28c0e914329610731f665ad2.tar.gz kernel-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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
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)); |
