On Mon, Sep 28, 2026 at 2:27 AM Andrew Halaney [off-list ref] wrote:
From: Christian Brauner <brauner@kernel.org>
Currently only the struct pid of the thread-group leader is recorded
for a socket's peer. To make room for the struct pid of the thread that
called connect(), listen() or socketpair() turn sk_peer_pid into an
array indexed by pid type. All users, including bluetooth and the
coredump socket, keep using the PIDTYPE_TGID slot.
Nothing fills the PIDTYPE_PID slot yet. No functional changes.
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Reviewed-by: Alexander Mikhalitsyn <redacted>
Signed-off-by: Andrew Halaney <redacted>
Technically, sk_peer_pid/lock do not need to be in struct sock and
can avoid bloating it just for a single user, but I can follow up on it.
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>