* [PATCH net] MPTCP: fix lock class name family in pm_nl_create_listen_socket
@ 2026-03-19 11:21 Li Xiasong
2026-03-19 12:55 ` Matthieu Baerts
2026-03-19 16:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Li Xiasong @ 2026-03-19 11:21 UTC (permalink / raw)
To: Matthieu Baerts, Mat Martineau, Geliang Tang, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman
Cc: netdev, mptcp, linux-kernel, yuehaibing, zhangchangzhong,
weiyongjun1
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;
int addrlen = sizeof(struct sockaddr_in);
struct sockaddr_storage addr;
struct sock *newsk, *ssk;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] MPTCP: fix lock class name family in pm_nl_create_listen_socket
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
2026-03-19 16:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2026-03-19 12:55 UTC (permalink / raw)
To: Li Xiasong, Mat Martineau, Geliang Tang, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman
Cc: netdev, mptcp, linux-kernel, yuehaibing, zhangchangzhong,
weiyongjun1
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] MPTCP: fix lock class name family in pm_nl_create_listen_socket
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
@ 2026-03-19 16:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-19 16:40 UTC (permalink / raw)
To: Li Xiasong
Cc: matttbe, martineau, geliang, davem, edumazet, kuba, pabeni, horms,
netdev, mptcp, linux-kernel, yuehaibing, zhangchangzhong,
weiyongjun1
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 19 Mar 2026 19:21:59 +0800 you 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>
>
> [...]
Here is the summary with links:
- [net] MPTCP: fix lock class name family in pm_nl_create_listen_socket
https://git.kernel.org/netdev/net/c/7ab4a7c5d969
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-19 16:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-03-19 16:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox