From: Geliang Tang Date: Thu, 9 Mar 2023 14:50:02 +0000 (+0100) Subject: mptcp: add ro_after_init for tcp{,v6}_prot_override X-Git-Tag: baikal/mips/sdk6.1~38 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=6b69656d79783684616967060b09ae46be4b9f58;p=kernel.git mptcp: add ro_after_init for tcp{,v6}_prot_override commit e3f255fd96d484af1a37ac9e735f8f1dc377d3dd upstream. Add __ro_after_init labels for the variables tcp_prot_override and tcpv6_prot_override, just like other variables adjacent to them, to indicate that they are initialised from the init hooks and no writes occur afterwards. Fixes: 3c2aa14b9ad8 ("mptcp: implement delegated actions") Cc: stable@vger.kernel.org Fixes: 00bbb2c1698b ("mptcp: mark ops structures as ro_after_init") Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 0bbaf26500e93..1645336932799 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -560,7 +560,7 @@ static struct request_sock_ops mptcp_subflow_v6_request_sock_ops __ro_after_init static struct tcp_request_sock_ops subflow_request_sock_ipv6_ops __ro_after_init; static struct inet_connection_sock_af_ops subflow_v6_specific __ro_after_init; static struct inet_connection_sock_af_ops subflow_v6m_specific __ro_after_init; -static struct proto tcpv6_prot_override; +static struct proto tcpv6_prot_override __ro_after_init; static int subflow_v6_conn_request(struct sock *sk, struct sk_buff *skb) { @@ -846,7 +846,7 @@ dispose_child: } static struct inet_connection_sock_af_ops subflow_specific __ro_after_init; -static struct proto tcp_prot_override; +static struct proto tcp_prot_override __ro_after_init; enum mapping_status { MAPPING_OK,