summaryrefslogtreecommitdiff
path: root/net/mptcp/pm_kernel.c
diff options
context:
space:
mode:
authorLi Xiasong <lixiasong1@huawei.com>2026-03-19 19:21:59 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-25 11:13:29 +0100
commitf5cef51b578de6e3dd29bfc6e91d07558840e1f4 (patch)
tree6dda8235f6ec073daf9b33b63333d9f857211860 /net/mptcp/pm_kernel.c
parent1e4e2f5e48cec0cccaea9815fb9486c084ba41e2 (diff)
MPTCP: fix lock class name family in pm_nl_create_listen_socket
[ Upstream commit 7ab4a7c5d969642782b8a5b608da0dd02aa9f229 ] 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> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260319112159.3118874-1-lixiasong1@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/mptcp/pm_kernel.c')
-rw-r--r--net/mptcp/pm_kernel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c
index 0ef43993e15a..17eb50276e77 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;