mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
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>
This commit is contained in:
parent
c32f0bd7d4
commit
4d0446b7a2
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user