mptcp: avoid unneeded address copy
authorPaolo Abeni <pabeni@redhat.com>
Mon, 27 Mar 2023 10:22:21 +0000 (12:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:34:06 +0000 (10:34 +0200)
[ Upstream commit 2bb9a37f0e194ed95c70603b0efc7898a5a0d9b4 ]

In the syn_recv fallback path, the msk is unused. We can skip
setting the socket address.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 7e8b88ec35ee ("mptcp: consolidate passive msk socket initialization")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mptcp/subflow.c

index 67ddbf6..4995a62 100644 (file)
@@ -759,8 +759,6 @@ create_child:
                                goto dispose_child;
                        }
 
-                       if (new_msk)
-                               mptcp_copy_inaddrs(new_msk, child);
                        mptcp_subflow_drop_ctx(child);
                        goto out;
                }