Re: [PATCH net] net: initialize sk_peer_lock in cloned sockets
From: patchwork-bot+netdevbpf
Date: Sat Nov 21 2026 - 18:44:46 EST
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:
On Wed, 18 Nov 2026 18:17:52 +0800 you wrote:
> sock_copy() clones a struct sock with two memcpys that both include
> sk_peer_lock. sk_clone() re-initializes sk_lock, but nothing resets
> sk_peer_lock, so a clone created while the parent's sk_peer_lock is held
> inherits the lock in the locked state.
>
> The first getsockopt(SO_PEERCRED) on such a child spins forever in
> queued_spin_lock_slowpath(). spin_lock() disables preemption, so the
> task never schedules and its CPU stops reporting quiescent states; RCU
> grace periods then stop and callers of synchronize_rcu(), such as
> expand_files() from accept(), hang.
>
> [...]
Here is the summary with links:
- [net] net: initialize sk_peer_lock in cloned sockets
https://git.kernel.org/netdev/net/c/ff73a2bb558f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html