Skip to content

Commit beab26d

Browse files
Li Xiasonggregkh
authored andcommitted
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: cee4034 ("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>
1 parent d938dd5 commit beab26d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/mptcp/pm_kernel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ static struct lock_class_key mptcp_keys[2];
824824
static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
825825
struct mptcp_pm_addr_entry *entry)
826826
{
827-
bool is_ipv6 = sk->sk_family == AF_INET6;
827+
bool is_ipv6 = entry->addr.family == AF_INET6;
828828
int addrlen = sizeof(struct sockaddr_in);
829829
struct sockaddr_storage addr;
830830
struct sock *newsk, *ssk;

0 commit comments

Comments
 (0)