From: Paolo Abeni <pabeni@redhat.com>
To: menglong8.dong@gmail.com
Cc: mptcp@lists.linux.dev, Menglong Dong <imagedong@tencent.com>
Subject: Re: [PATCH net v5 0/2] net: mptcp: fix unreleased socket in accept queue
Date: Mon, 19 Sep 2022 16:17:17 +0200 [thread overview]
Message-ID: <5d0371c3eb22b65bafd6d46ff59a77ad20bdcfc9.camel@redhat.com> (raw)
In-Reply-To: <20220911041418.818201-1-imagedong@tencent.com>
On Sun, 2022-09-11 at 12:14 +0800, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <imagedong@tencent.com>
>
> The mptcp socket and its subflow sockets in accept queue can't be
> released after the process exit.
>
> While the release of a mptcp socket in listening state, the
> corresponding tcp socket will be released too. Meanwhile, the tcp
> socket in the unaccept queue will be released too. However, only init
> subflow is in the unaccept queue, and the joined subflow is not in the
> unaccept queue, which makes the joined subflow won't be released, and
> therefore the corresponding unaccepted mptcp socket will not be released
> to.
>
> In the 1th patch, we factor-out __mptcp_close() which should run under
> socket lock.
>
> And in the 2th patch, we fix the problem we mentioned above by closing
> all of the unaccepted mptcp socket in mptcp_subflow_queue_clean()
> with __mptcp_close().
>
> Changes since v4:
> - keep sock_hold() in __mptcp_close() in the 1th patch
> - rename cancel_work to do_cancel_work in the 1th patch
> - don't make mptcp_cancel_work() inline in the 2th patch
>
> Changes since v3:
> - factor out __mptcp_close() and replace mptcp_close() with it in
> mptcp_subflow_queue_clean()
>
> Menglong Dong (2):
> net: mptcp: factor out __mptcp_close() without socket lock
> net: mptcp: fix unreleased socket in accept queue
>
> net/mptcp/protocol.c | 16 +++++++++++++---
> net/mptcp/protocol.h | 2 ++
> net/mptcp/subflow.c | 33 +++++++--------------------------
> 3 files changed, 22 insertions(+), 29 deletions(-)
I think this is now even a nice cleanup, beyond a relevant bug-fix,
thanks!
For the series:
Acked-by: Paolo Abeni <pabeni@redhat.com>
next prev parent reply other threads:[~2022-09-19 14:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-11 4:14 [PATCH net v5 0/2] net: mptcp: fix unreleased socket in accept queue menglong8.dong
2022-09-11 4:14 ` [PATCH net v5 1/2] net: mptcp: factor out __mptcp_close() without socket lock menglong8.dong
2022-09-11 4:14 ` [PATCH net v5 2/2] net: mptcp: fix unreleased socket in accept queue menglong8.dong
2022-09-19 14:17 ` Paolo Abeni [this message]
2022-09-19 15:14 ` [PATCH net v5 0/2] " Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d0371c3eb22b65bafd6d46ff59a77ad20bdcfc9.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=imagedong@tencent.com \
--cc=menglong8.dong@gmail.com \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).