]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phonet: take correct lock to peek at the RX queue
authorRémi Denis-Courmont <courmisch@gmail.com>
Sun, 18 Feb 2024 08:12:13 +0000 (10:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:35:10 +0000 (13:35 +0100)
commit3ebd19073efde6ff4a54246cc68a0414a401d918
tree7eb7d08f485ac0c0870f56c3e33d56d35d972c55
parent9adfd66b42d28a1763292bae5c5a163d7dce0cd6
phonet: take correct lock to peek at the RX queue

[ Upstream commit 3b2d9bc4d4acdf15a876eae2c0d83149250e85ba ]

The receive queue is protected by its embedded spin-lock, not the
socket lock, so we need the former lock here (and only that one).

Fixes: 107d0d9b8d9a ("Phonet: Phonet datagram transport protocol")
Reported-by: Luosili <rootlab@huawei.com>
Signed-off-by: Rémi Denis-Courmont <courmisch@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240218081214.4806-1-remi@remlab.net
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/phonet/datagram.c