From nobody Mon May 6 19:28:23 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:9f92:0:0:0:0:0 with SMTP id a18csp3090965jam; Thu, 10 Feb 2022 06:55:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJz85BIifm0sTjliFUWWL0e4CXleGY07a8t/79RSswz8HJ6kL5uO6PtsPkkL7MfRLNcr4D7Q X-Received: by 2002:a17:90b:164a:: with SMTP id il10mr3170101pjb.136.1644504944130; Thu, 10 Feb 2022 06:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644504944; cv=none; d=google.com; s=arc-20160816; b=a0Suo1g8+mQfyXoYXzp8YcPOWsHLZhOuortb6Ve+nQj2CwZt1d95D//0Xvpxj+MmLz sfyT9X9mKIxHnoLlbPMbJAEaIexlI/Qha8m8HI1MqGRSmukZGy/DIlaJ334Gr3NnNGrI YsB+sqTVqhRuJo3BKbDgITbvH3rosDdPI+M7dsdP1k8RFGBW8zufOjPlKVnahMerYnQT dDwxfo8qQRIur/TLOduz9b5Dwq8x2vSGpe5If/ciCCte9tpZGeo2reXG0DXswKjZ89SM MA42o6TGzCoXZPaKziNn4MUW4JqoUFzHkYyp1SksWemffUGRwPE9tZmBEj6Y1G80oQTY xQdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=twRxqd/DxV0yxKDlV0kJl4qu44EpoOsVt05YWroPEe0=; b=egwofqo/w4k8eKmCu0n0VVqyK5naeyqGoId51yh7L/XcybyTXbol9KGs66TxarxP/G C0q3oPhwkjT5njfZPzT4nldDPtorsfcwq/7TFI5VresK6Uw3anV+4Wpjpr0v3pyRjYEN qJJwpvc5fgNzwiC7/6lSKUZf4AKGD9m17cTVmIXfyv/60UvbHnLDdnCvAkkly9kFVCd8 xk1dsyyeM6Flx4lRN/RG9F1NvNcsE4YBSyu3oTltiSCdM6wPB1K5vI1dzeCjCft0yMFP F5BhEqd6RpPcE5yXBkxm3EENORXamMpZNE88BuRkctEfD9FVD/xSURs3Q6UlzedgT1T3 HYYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mptcp+bounces-3637-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.69.165 as permitted sender) smtp.mailfrom="mptcp+bounces-3637-wpasupplicant.patchew=gmail.com@lists.linux.dev" Return-Path: Received: from sjc.edge.kernel.org (sjc.edge.kernel.org. [147.75.69.165]) by mx.google.com with ESMTPS id nu18si1821840pjb.173.2022.02.10.06.55.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Feb 2022 06:55:44 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-3637-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.69.165 as permitted sender) client-ip=147.75.69.165; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mptcp+bounces-3637-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.69.165 as permitted sender) smtp.mailfrom="mptcp+bounces-3637-wpasupplicant.patchew=gmail.com@lists.linux.dev" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sjc.edge.kernel.org (Postfix) with ESMTPS id 77BBA3E106C for ; Thu, 10 Feb 2022 14:55:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62E232C9C; Thu, 10 Feb 2022 14:55:42 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [193.142.43.52]) (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 136E62F20 for ; Thu, 10 Feb 2022 14:55:40 +0000 (UTC) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1nIArD-00034m-8q; Thu, 10 Feb 2022 15:55:39 +0100 From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH mptcp-next] mptcp: subflow: get_af_ops should return const Date: Thu, 10 Feb 2022 15:55:34 +0100 Message-Id: <20220210145534.32660-1-fw@strlen.de> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Thre returned structure is read-only. Signed-off-by: Florian Westphal --- Could be squashed with 'mptcp: mark ops structures as ro_after_init'. net/mptcp/subflow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 5bd49a350750..e727d838da0e 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -787,7 +787,7 @@ static struct sock *subflow_syn_recv_sock(const struct = sock *sk, return child; } =20 -static struct inet_connection_sock_af_ops subflow_specific; +static struct inet_connection_sock_af_ops subflow_specific __ro_after_init; static struct proto tcp_prot_override; =20 enum mapping_status { @@ -1313,7 +1313,7 @@ static void subflow_write_space(struct sock *ssk) mptcp_write_space(sk); } =20 -static struct inet_connection_sock_af_ops * +static const struct inet_connection_sock_af_ops * subflow_default_af_ops(struct sock *sk) { #if IS_ENABLED(CONFIG_MPTCP_IPV6) @@ -1328,7 +1328,7 @@ void mptcpv6_handle_mapped(struct sock *sk, bool mapp= ed) { struct mptcp_subflow_context *subflow =3D mptcp_subflow_ctx(sk); struct inet_connection_sock *icsk =3D inet_csk(sk); - struct inet_connection_sock_af_ops *target; + const struct inet_connection_sock_af_ops *target; =20 target =3D mapped ? &subflow_v6m_specific : subflow_default_af_ops(sk); =20 --=20 2.34.1