From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 642723AE48 for ; Wed, 7 Jun 2023 20:23:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8ECEC433EF; Wed, 7 Jun 2023 20:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1686169434; bh=NzEPcKervLugpEAasHPOHiuyqhyE4vRH/b5OPKuJUkM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DST3zy7aWEIU57y9rIMRAI0VHkmyYsKQU9DaeFyptQynL52iCEBH1rrys3xhloTac Q6GRl7o61QlphNnCG9S3xRl5vVK6MBoJqu7GiUsQsjtvojocc4yZJSEEetLvwf4AgK arDWUJ8MmAHpi559XKpMiGr+xaFMOUcXRtG82osw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Paolo Abeni , Matthieu Baerts , "David S. Miller" , Sasha Levin Subject: [PATCH 6.3 080/286] mptcp: avoid unneeded address copy Date: Wed, 7 Jun 2023 22:12:59 +0200 Message-ID: <20230607200925.690150866@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230607200922.978677727@linuxfoundation.org> References: <20230607200922.978677727@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Paolo Abeni [ 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 Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller Stable-dep-of: 7e8b88ec35ee ("mptcp: consolidate passive msk socket initialization") Signed-off-by: Sasha Levin --- net/mptcp/subflow.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 281c1cc8dc8dc..8a6bd2782dc97 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -823,8 +823,6 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk, goto dispose_child; } - if (new_msk) - mptcp_copy_inaddrs(new_msk, child); mptcp_subflow_drop_ctx(child); goto out; } -- 2.39.2