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 d9e63c7a
-
mentioned in commit acf1e880
-
mentioned in commit dae884c9
-
mentioned in commit 72b8260f
-
mentioned in commit 739805a8
-
mentioned in commit fd686cdf
-
mentioned in commit 5e11eebe
-
mentioned in commit 24333151
-
mentioned in commit af14ad33
-
mentioned in commit 411de4c3
-
mentioned in commit 0498b25a
-
mentioned in commit 844c9666
-
mentioned in commit 98aebd30
Please sign in to comment