af_unix: Save listener for embryo socket.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 25 Mar 2024 20:24:17 +0000 (13:24 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Mar 2024 15:28:10 +0000 (08:28 -0700)
commitaed6ecef55d70de3762ce41c561b7f547dbaf107
treefb78337e005edf8826c68ed89c7bf068304ef20a
parent3484f063172dd88776b062046d721d7c2ae1af7c
af_unix: Save listener for embryo socket.

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>
include/net/af_unix.h
net/unix/af_unix.c