Skip to content

Commit ba3d633

Browse files
Li Xiasongopsiff
authored andcommitted
MPTCP: fix lock class name family in pm_nl_create_listen_socket
commit 7ab4a7c5d969642782b8a5b608da0dd02aa9f229 upstream. 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> [ Conflict in pm_kernel.c, because commit 8617e85 ("mptcp: pm: split in-kernel PM specific code") is not in this version, and moves code from pm_netlink.c to pm_kernel.c. ] Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 79bc854d44f9fb4c7526aace0fa6a941e20683ce) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent da84b30 commit ba3d633

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/mptcp/pm_netlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ static struct lock_class_key mptcp_keys[2];
11891189
static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
11901190
struct mptcp_pm_addr_entry *entry)
11911191
{
1192-
bool is_ipv6 = sk->sk_family == AF_INET6;
1192+
bool is_ipv6 = entry->addr.family == AF_INET6;
11931193
int addrlen = sizeof(struct sockaddr_in);
11941194
struct sockaddr_storage addr;
11951195
struct sock *newsk, *ssk;

0 commit comments

Comments
 (0)