af_unix: Allocate struct unix_edge for each inflight AF_UNIX fd.
commit 29b64e35 upstream. As with the previous patch, we preallocate to skb's scm_fp_list an array of struct unix_edge in the number of inflight AF_UNIX fds. There we just preallocate memory and do not use immediately because sendmsg() could fail after this point. The actual use will be in the next patch. When we queue skb with inflight edges, we will set the inflight socket's unix_sock as unix_edge->predecessor and the receiver's unix_sock as successor, and then we will link the edge to the inflight socket's unix_vertex.edges. Note that we set NULL to cloned scm_fp_list.edges in scm_fp_dup() so that MSG_PEEK does not change the shape of the directed graph. Signed-off-by:Kuniyuki Iwashima <kuniyu@amazon.com> Acked-by:
Paolo Abeni <pabeni@redhat.com> Link: https://lore.kernel.org/r/20240325202425.60930-3-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>
Loading
-
mentioned in commit 819e008b
-
mentioned in commit 3d7f0f91
-
mentioned in commit 7b0f3ca1
-
mentioned in commit c7e61007
-
mentioned in commit a16162ed
-
mentioned in commit 3940c797
-
mentioned in commit 84a59c9e
-
mentioned in commit 886cff03
-
mentioned in commit ddc00ec5
-
mentioned in commit 6c08a31a
-
mentioned in commit 4b411fc4
-
mentioned in commit c35698f1
-
mentioned in commit 45271a2c
Please sign in to comment