[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d92dae5c-30bd-897d-8ffe-13a1a860541c@tessares.net>
Date: Thu, 20 Oct 2022 14:45:18 +0200
From: Matthieu Baerts <matthieu.baerts@...sares.net>
To: Kuniyuki Iwashima <kuniyu@...zon.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
David Ahern <dsahern@...nel.org>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>
Cc: Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org,
Mat Martineau <mathew.j.martineau@...ux.intel.com>,
mptcp@...ts.linux.dev
Subject: Re: [PATCH v2 net-next 1/5] inet6: Remove inet6_destroy_sock() in
sk->sk_prot->destroy().
Hi Kuniyuki
On 20/10/2022 00:35, Kuniyuki Iwashima wrote:
> After commit d38afeec26ed ("tcp/udp: Call inet6_destroy_sock()
> in IPv6 sk->sk_destruct()."), we call inet6_destroy_sock() in
> sk->sk_destruct() by setting inet6_sock_destruct() to it to make
> sure we do not leak inet6-specific resources.
>
> Now we can remove unnecessary inet6_destroy_sock() calls in
> sk->sk_prot->destroy().
>
> DCCP and SCTP have their own sk->sk_destruct() function, so we
> change them separately in the following patches.
(...)
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index f599ad44ed24..2e16c897c229 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -3898,12 +3898,6 @@ static const struct proto_ops mptcp_v6_stream_ops = {
>
> static struct proto mptcp_v6_prot;
>
> -static void mptcp_v6_destroy(struct sock *sk)
> -{
> - mptcp_destroy(sk);
> - inet6_destroy_sock(sk);
> -}
> -
> static struct inet_protosw mptcp_v6_protosw = {
> .type = SOCK_STREAM,
> .protocol = IPPROTO_MPTCP,
> @@ -3919,7 +3913,6 @@ int __init mptcp_proto_v6_init(void)
> mptcp_v6_prot = mptcp_prot;
> strcpy(mptcp_v6_prot.name, "MPTCPv6");
> mptcp_v6_prot.slab = NULL;
> - mptcp_v6_prot.destroy = mptcp_v6_destroy;
> mptcp_v6_prot.obj_size = sizeof(struct mptcp6_sock);
>
> err = proto_register(&mptcp_v6_prot, 1);
Thank you for the new version!
For the modifications in net/mptcp here above:
Reviewed-by: Matthieu Baerts <matthieu.baerts@...sares.net>
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
Powered by blists - more mailing lists