]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
af_unix: Save listener for embryo socket.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 21 May 2025 15:27:13 +0000 (16:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:24 +0000 (14:40 +0200)
commit12365b707cd54264a847f8d3a8304a15912deb28
tree8c6303fabcb1d9a27191b962120d75678143f8f7
parenta6c7ce40eac1a895e60aa5a4875458b88cecf297
af_unix: Save listener for embryo socket.

commit aed6ecef55d70de3762ce41c561b7f547dbaf107 upstream.

This is a prep patch for the following change, where we need to
fetch the listening socket from the successor embryo socket
during GC.

We add a new field to struct unix_sock to save a pointer to a
listening socket.

We set it when connect() creates a new socket, and clear it when
accept() is called.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/r/20240325202425.60930-8-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/af_unix.h
net/unix/af_unix.c