All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang at gmail.com>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [MPTCP][PATCH v7 mptcp-next 1/7] mptcp: create the listening socket for new port
Date: Mon, 14 Dec 2020 12:22:36 +0800	[thread overview]
Message-ID: <CA+WQbwvOkURz8TXp0fBzLfRNcM1HSrauaAbRYysZk4v+tYPSvg@mail.gmail.com> (raw)
In-Reply-To: 8d83a6f809c0856b4488247da8d7d48bea1fa66f.camel@redhat.com

[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]

Hi Paolo,

Paolo Abeni <pabeni(a)redhat.com> 于2020年12月11日周五 下午11:21写道:
>
> On Thu, 2020-12-10 at 11:48 +0800, Geliang Tang wrote:
> > Hi Paolo,
> >
> > On Wed, Dec 09, 2020 at 04:25:33PM +0100, Paolo Abeni wrote:
> > > On Wed, 2020-12-09 at 20:33 +0800, Geliang Tang wrote:
> > > > The full log and the patch is attached. Apply this patch and run
> > > > mptcp_join.sh can reproduce the warning.
> > >
> > > I tried applying the v7 posted on the ML, plus some manging to let it
> > > apply on top of current export. The end result is quite alike the patch
> > > attached here.
> > >
> > > Still I can't reproduce the issue.
> >
> > Thanks for your help.
> >
> > v7 should be added the following code in pm_netlink.c to invoke
> > sock_release to reproduce the issue:
> >
> > @@ -885,6 +968,8 @@ static int mptcp_nl_cmd_del_addr(struct sk_buff *skb, struct genl_info *info)
> >         spin_unlock_bh(&pernet->lock);
> >
> >         mptcp_nl_remove_subflow_and_signal_addr(sock_net(skb->sk), &entry->addr);
> > +       if (entry->lsk)
> > +               sock_release(entry->lsk);
> >         kfree_rcu(entry, rcu);
> >
> >         return ret;
> >
> > > I'm wondering if the kconfig matters here (beyond CONFIG_LOCKDEP=y, I
> > > mean). Could you please share the config you are using ?
>
> Ok, I can reproduce the issue with the above chunk. Looks like it's
> just a neste lock issue. I'm unsure why lockdep did not splat before -
> the issue has been there since sometime.
>
> Anyhow the following fixes the issue here:
> ---
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 56bc1ed94ca7..63f3043c1c1d 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -2144,7 +2144,7 @@ void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,
>
>         list_del(&subflow->node);
>
> -       lock_sock(ssk);
> +       lock_sock_nested(ssk, SINGLE_DEPTH_NESTING);
>
>         /* if we are invoked by the msk cleanup code, the subflow is
>          * already orphaned
> ---

Thanks for your help. I tested this patch, it works well. Please send this
patch to the ML and add my reported-and-tested tag in it:

Reported-and-tested-by: Geliang Tang <geliangtang(a)gmail.com>

Thanks very much.

-Geliang

> /P
>
>

             reply	other threads:[~2020-12-14  4:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  4:22 Geliang Tang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-11 15:21 [MPTCP] Re: [MPTCP][PATCH v7 mptcp-next 1/7] mptcp: create the listening socket for new port Paolo Abeni
2020-12-10  3:48 Geliang Tang
2020-12-09 15:25 Paolo Abeni
2020-12-09 12:33 Geliang Tang
2020-12-09 11:24 Geliang Tang
2020-12-09 11:13 Paolo Abeni
2020-12-09 10:27 Geliang Tang
2020-12-08 15:39 Paolo Abeni
2020-12-07  6:30 Geliang Tang
2020-12-04 10:21 Paolo Abeni
2020-12-04  1:47 Mat Martineau
2020-12-04  1:36 Mat Martineau

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=CA+WQbwvOkURz8TXp0fBzLfRNcM1HSrauaAbRYysZk4v+tYPSvg@mail.gmail.com \
    --to=unknown@example.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.