public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Li Xiasong <lixiasong1@huawei.com>,
	Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
	linux-kernel@vger.kernel.org, yuehaibing@huawei.com,
	zhangchangzhong@huawei.com, weiyongjun1@huawei.com
Subject: Re: [PATCH net] MPTCP: fix lock class name family in pm_nl_create_listen_socket
Date: Thu, 19 Mar 2026 13:55:23 +0100	[thread overview]
Message-ID: <90943080-7580-4491-9669-63034f4acb42@kernel.org> (raw)
In-Reply-To: <20260319112159.3118874-1-lixiasong1@huawei.com>

Hi Li,

On 19/03/2026 12:21, Li Xiasong wrote:
> In mptcp_pm_nl_create_listen_socket(), use entry->addr.family
> instead of sk->sk_family for lock class setup. The 'sk' parameter
> is a netlink socket, not the MPTCP subflow socket being created.
> 
> Fixes: cee4034a3db1 ("mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket()")
> Signed-off-by: Li Xiasong <lixiasong1@huawei.com>
> ---
>  net/mptcp/pm_kernel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c
> index b2b9df43960e..82e59f9c6dd9 100644
> --- a/net/mptcp/pm_kernel.c
> +++ b/net/mptcp/pm_kernel.c
> @@ -838,7 +838,7 @@ static struct lock_class_key mptcp_keys[2];
>  static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
>  					    struct mptcp_pm_addr_entry *entry)
>  {
> -	bool is_ipv6 = sk->sk_family == AF_INET6;
> +	bool is_ipv6 = entry->addr.family == AF_INET6;

Good catch! 'sk' name is confusing, it would probably be better to pass
"struct net *" instead. But this can be done later, that's more a
net-next material.

(For next time, please use 'mptcp:' prefix instead of 'MPTCP:' in the
subject, similar to all other commits in this directory.)


Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>


@Netdev maintainers: this patch can be applied in the 'net' tree directly.

>  	int addrlen = sizeof(struct sockaddr_in);
>  	struct sockaddr_storage addr;
>  	struct sock *newsk, *ssk;

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2026-03-19 12:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 11:21 [PATCH net] MPTCP: fix lock class name family in pm_nl_create_listen_socket Li Xiasong
2026-03-19 12:55 ` Matthieu Baerts [this message]
2026-03-19 16:40 ` patchwork-bot+netdevbpf

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=90943080-7580-4491-9669-63034f4acb42@kernel.org \
    --to=matttbe@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixiasong1@huawei.com \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=weiyongjun1@huawei.com \
    --cc=yuehaibing@huawei.com \
    --cc=zhangchangzhong@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox