]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
af_unix: Use skb_queue_len_lockless() in sk_diag_show_rqlen().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 4 Jun 2024 16:52:40 +0000 (09:52 -0700)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Fri, 2 Aug 2024 14:26:47 +0000 (16:26 +0200)
commit2859b932dd3b77c4d7919e0d5be6743a456b1357
tree0ef3f11e6425e41833d85da80b96f7db0da43078
parent6f2c09011e9172aac001a7f27a05ece36700dca3
af_unix: Use skb_queue_len_lockless() in sk_diag_show_rqlen().

BugLink: https://bugs.launchpad.net/bugs/2074091
[ Upstream commit 5d915e584d8408211d4567c22685aae8820bfc55 ]

We can dump the socket queue length via UNIX_DIAG by specifying
UDIAG_SHOW_RQLEN.

If sk->sk_state is TCP_LISTEN, we return the recv queue length,
but here we do not hold recvq lock.

Let's use skb_queue_len_lockless() in sk_diag_show_rqlen().

Fixes: c9da99e6475f ("unix_diag: Fixup RQLEN extension report")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
net/unix/diag.c